{"id":28961493,"url":"https://github.com/gitfrid/czechfoi-stacksim","last_synced_at":"2026-02-02T11:39:51.207Z","repository":{"id":292594463,"uuid":"981363348","full_name":"gitfrid/CzechFOI-StackSim","owner":"gitfrid","description":"CzechFOI-StackSim","archived":false,"fork":false,"pushed_at":"2025-05-11T00:21:18.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-11T00:26:39.054Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gitfrid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-10T23:49:11.000Z","updated_at":"2025-05-11T00:21:21.000Z","dependencies_parsed_at":"2025-05-11T00:36:40.268Z","dependency_job_id":null,"html_url":"https://github.com/gitfrid/CzechFOI-StackSim","commit_stats":null,"previous_names":["gitfrid/czechfoi-stacksim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gitfrid/CzechFOI-StackSim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitfrid%2FCzechFOI-StackSim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitfrid%2FCzechFOI-StackSim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitfrid%2FCzechFOI-StackSim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitfrid%2FCzechFOI-StackSim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gitfrid","download_url":"https://codeload.github.com/gitfrid/CzechFOI-StackSim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitfrid%2FCzechFOI-StackSim/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261589903,"owners_count":23181435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-24T02:03:42.277Z","updated_at":"2026-02-02T11:39:51.176Z","avatar_url":"https://github.com/gitfrid.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"### CzechFOI-StackSim \n**CzechFOI Investigation into whether normalized population trends per age and stacking events are fairly distributed**\n\n\u003cbr\u003e\n\n**Hypothesis: There is no way to compare vaccinated (VX) and unvaccinated (UVX) groups perfectly fair and exactly by measurement or mathematically when the groups are defined by a time-dependent, non-random vaccination schedule, even if the underlying individual death rates are the same!**\n\n\u003cbr\u003ePhyton script [B) event_stacking.py](https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Py%20Scripts/B%29%20event_stacking.py)\n\u003cbr\u003e\n\u003cbr\u003e**Intention of code:**\n    \u003cbr\u003e Simulate a homogeneous population (split by age), where people:\n    \u003cbr\u003e -\u003e Die randomly at a constant rate over time (Day 0..1100)\n    \u003cbr\u003e -\u003e Some get vax on specific days. (Doses curve from real FOI data)\n    \u003cbr\u003e -\u003e Compare how many people die in each group (normalized):\n    \u003cbr\u003e -\u003e Vaccinated (vx), Unvaccinated (uvx)\n    \u003cbr\u003e **The idea is to see whether vx people die as often as uvx people — assuming everyone is otherwise equal from a homogen total population.**\n\n\u003cbr\u003e**But in practice, the code:**\n    \u003cbr\u003e Assigns a death date to everyone randomly ✅\n    \u003cbr\u003e Assigns doses starting at a certain day (FOI Data) ✅\n    \u003cbr\u003e **Only labels a person as \"vaccinated\" if their death date is after their dose day! ❌**\n    \u003cbr\u003e So people who die early are forced into the unvaccinated group \n    \u003cbr\u003e\n\u003cbr\u003e**Simulates a homogeneous population with a constant death rate, then splits it into (vx) and (uvx) groups. However, it introduces bias by only allowing people who survive long enough to be (vx). This gives vx individuals an unfair survival advantage, making vx appear beneficial — even if it had zero actual effect..**\n\n_________________________________________\n**Death and Population Trends per Age simulation - Immortal Time Bias**\n\nThis example illustrates the normalized death rate for individuals aged 70 within a heterogeneous population, where the random death rate remains constant over time (from day 0 to day 1100). \nThe individuals in the vx group are randomly selected and shifted from the total population based on the number of doses administered to that age group. (Distribution of doses over time from the real FOI-Data )  \n\n\n**Total, vx and uvx normalized death rates should theoretically be equal**\u003cbr\u003e\nShows normalized death rate for AGE 70 - simulated.\u003cbr\u003e \n\u003cbr\u003e\n\u003cimg src=https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B%29%20event_stacking/B%29%20Population_and_Deaths_Trends_with_All_Doses_SIM.png width=\"1280\" height=\"auto\"\u003e\n\u003cbr\u003e\n\nShows raw death rate for AGE 70 - simulated.\u003cbr\u003e\n\u003cbr\u003e\n\u003cimg src=https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B%29%20event_stacking/B%29%20Population_and_Deaths_Trends_with_All_Doses_SIM_RAW.png width=\"1280\" height=\"auto\"\u003e\n\u003cbr\u003e\n\n[Download interactive html](https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B%29%20event_stacking/B%29%20Population_and_Deaths_Trends_with_All_Doses_SIM.html)\n_________________________________________\n**Normalized Stacked Mean Deaths and Doses per Age (Aligned to Doses)**\n\n**Stacked normalized curves (total, vx and uvx) should  theoretically have a horizontal course at the same level**\u003cbr\u003e\nStacked curve normalized for AGE 70 - simulated\u003cbr\u003e \n\u003cbr\u003e\n\u003cimg src=https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B%29%20event_stacking/B%29%20DoseAligned_Stacked_Normalized_Deaths_SIM.png width=\"1280\" height=\"auto\"\u003e\n\u003cbr\u003e\n\nStacked curve raw simulated for AGE 70 - simulated.\u003cbr\u003e\n\u003cbr\u003e\n\u003cimg src=https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B%29%20event_stacking/B%29%20DoseAligned_Stacked_Normalized_Deaths_SIM_RAW.png width=\"1280\" height=\"auto\"\u003e\n\u003cbr\u003e\n\n[Download interactive html](https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B%29%20event_stacking/B%29%20DoseAligned_Stacked_Normalized_Deaths_SIM.html)\n_________________________________________\n\u003cbr\u003e\n\n### Same sample with immune protection lag bias \nThe study says protection starts after 21 days (the immune lag).\nVX people are wrongly counted as UVX during the delay period - when not handled correctly.\nSame homogeneous population as above with same random constant death rate over time \n_________________________________________\n**Total, vx and uvx normalized death rates should theoretically be equal**\u003cbr\u003e\nShows normalized death rate for AGE 70 - simulated with POST_VX_DELAY=21 days.\u003cbr\u003e \n\u003cbr\u003e\n\u003cimg src=https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B)%20event_stacking/B)%20Population_and_Deaths_Trends_with_All_Doses_POSTVXDELAY_21_SIM.png width=\"1280\" height=\"auto\"\u003e\n\u003cbr\u003e\n\nShows raw death rate for AGE 70 - simulated with POST_VX_DELAY=21 days.\u003cbr\u003e\n\u003cbr\u003e\n\u003cimg src=https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B)%20event_stacking/B)%20Population_and_Deaths_Trends_with_All_Doses_POSTVXDELAY_21_SIM_RAW.png width=\"1280\" height=\"auto\"\u003e\n\u003cbr\u003e\n\n[Download interactive html](https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B%29%20event_stacking/B%29%20Population_and_Deaths_Trends_with_All_Doses_POSTVXDELAY_21_SIM.html)\n_________________________________________\n**Normalized Stacked Mean Deaths and Doses per Age (Aligned to Doses)**\n\n**Stacked normalized curves (total, vx and uvx) should  theoretically have a horizontal course at the same level**\u003cbr\u003e\nStacked curve normalized for AGE 70 - simulated with POST_VX_DELAY=21 days\u003cbr\u003e \n\u003cbr\u003e\n\u003cimg src=https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B)%20event_stacking/B)%20DoseAligned_Stacked_Normalized_Deaths_POSTVXDELAY_21_SIM.png width=\"1280\" height=\"auto\"\u003e\n\u003cbr\u003e\n\nStacked curve raw simulated for AGE 70 - simulated with POST_VX_DELAY=21 days.\u003cbr\u003e\n\u003cbr\u003e\n\u003cimg src=https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B)%20event_stacking/B)%20DoseAligned_Stacked_Normalized_Deaths_POSTVXDELAY_21_SIM_RAW.png width=\"1280\" height=\"auto\"\u003e\n\u003cbr\u003e\n\n[Download interactive html](https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B%29%20event_stacking/B%29%20DoseAligned_Stacked_Normalized_Deaths_POSTVXDELAY_21_SIM.html)\n_________________________________________\n\u003cbr\u003e\n\n### Same sample with protection lag and few extra deaths \nAlright, let’s now add a few additional deaths to the homogeneous population and observe what happens when we randomly split them into (vx) and (uvx) groups.\n\u003cbr\u003e\n\u003cbr\u003eNote that the split is random, except that individuals who died before receiving a dose are not assigned to the (vx) group — **since you think including them would be paradoxical.** Instead, another random living individual is selected for (vx) group in their place.\n\u003cbr\u003e\n\u003cbr\u003eIt is statistically difficult to detect a signal from such a small number of additional deaths, as the counterfactual baseline is unknown.\n_________________________________________\n**Total, vx and uvx normalized death rates should theoretically be equal**\u003cbr\u003e\nShows normalized death rate for age 70 — simulated with POST_VX_DELAY = 21 days, and one extra death per 5,000 doses, occurring on a random day within a 248-day time window. These extra deaths are distributed to the hetrogen population around the time the doses were administered.\u003cbr\u003e \n\u003cbr\u003e\n\u003cimg  src=https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B)%20event_stacking/B)%20Population_and_Deaths_Trends_with_All_Doses_EXTRA_D_SIM.png width=\"1280\" height=\"auto\"\u003e\n\u003cbr\u003e\n\nShows rwaw death rate for age 70 — simulated with POST_VX_DELAY = 21 days, and one extra death per 5,000 doses, occurring on a random day within a 248-day time window.\u003cbr\u003e\n\u003cbr\u003e\n\u003cimg  src=https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B)%20event_stacking/B)%20Population_and_Deaths_Trends_with_All_Doses_EXTRA_D_RAW_SIM.png width=\"1280\" height=\"auto\"\u003e\n\u003cbr\u003e\n\n[Download interactive html](https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B%29%20event_stacking/B%29%20Population_and_Deaths_Trends_with_All_Doses_EXTRA_D_SIM.html)\n_________________________________________\n**Normalized Stacked Mean Deaths and Doses per Age (Aligned to Doses)**\n\nStacked curve normalized for AGE 70 - simulated with POST_VX_DELAY=21 days, and one extra death per 5000 Doses on random day inside a time window of 248 days\u003cbr\u003e \n\u003cbr\u003e\n\u003cimg src=https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B)%20event_stacking/B)%20DoseAligned_Stacked_Normalized_Deaths_EXTRA_D_SIM.png width=\"1280\" height=\"auto\"\u003e\n\u003cbr\u003e\n\nStacked curve raw simulated for AGE 70 - simulated with POST_VX_DELAY=21 days, and one extra death per 5000 Doses on random day inside a time window of 248 days.\u003cbr\u003e\n\u003cbr\u003e\n\u003cimg src=https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B)%20event_stacking/B)%20DoseAligned_Stacked_Normalized_Deaths_EXTRA_D_RAW_SIM.png width=\"1280\" height=\"auto\"\u003e\n\u003cbr\u003e\n\n[Download interactive html](https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B%29%20event_stacking/B%29%20DoseAligned_Stacked_Normalized_Deaths_EXTRA_D_SIM.html)\n\n_________________________________________\n\u003cbr\u003e\n\n## Comparison with real FOI Data\n_________________________________________\n**Death and Population Trends per Age real FOI data**\n\nShows normalized death rate for AGE 70 - real.\u003cbr\u003e \n\u003cbr\u003e\n\u003cimg src=https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B)%20event_stacking/B)%20Population_and_Deaths_Trends_with_All_Doses_REAL.png width=\"1280\" height=\"auto\"\u003e\n\u003cbr\u003e\n\nShows raw death rate for AGE 70 - real.\u003cbr\u003e\n\u003cbr\u003e\n\u003cimg src=https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B)%20event_stacking/B)%20Population_and_Deaths_Trends_with_All_Doses_RAW_REAL.png width=\"1280\" height=\"auto\"\u003e\n\u003cbr\u003e\n\n[Download interactive html](https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B%29%20event_stacking/B%29%20Population_and_Deaths_Trends_with_All_Doses.html)\n_________________________________________\n**Normalized Stacked Mean Deaths and Doses per Age real FOI data (Aligned to Doses)**\n\nStacked curve normalized for AGE 70 - real.\u003cbr\u003e \n\u003cbr\u003e\n\u003cimg src=https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B)%20event_stacking/B)%20DoseAligned_Stacked_Normalized_Deaths_REAL.png width=\"1280\" height=\"auto\"\u003e\n\u003cbr\u003e\n\nStacked curve raw for AGE 70 - real.\u003cbr\u003e\u003cbr\u003e\n\u003cbr\u003e\n\u003cimg src=https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B)%20event_stacking/B)%20DoseAligned_Stacked_Normalized_Deaths_RAW_REAL.png width=\"1280\" height=\"auto\"\u003e\n\u003cbr\u003e\n\n[Download interactive html](https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/B%29%20event_stacking/B%29%20DoseAligned_Stacked_Normalized_Deaths.html)\n_________________________________________\n\n\u003cbr\u003e**Abbreviations:** The figures are per age group from the CSV files in the TERRA folder:\n| **Deaths**        | **Definition**                                             | **Population/Doses**  | **Definition**                                        |\n|-------------------|------------------------------------------------------------|-----------------------|-------------------------------------------------------|\n| NUM_D             | Number deaths                                              | NUM_POP               | Total population of people                                          |\n| NUM_DUVX          | Number unvaxed deaths                                      | NUM_UVX               | Number of unvaxed people                              |\n| NUM_DVX           | Number vaxed deaths                                        | NUM_VX                | Number of vaxed people  (who get first dose)                              |\n| NUM_DVD1-DVD7     | Number deaths doses 1 - 7                                  | NUM_VD1-VD7           | Number of vax doses 1 - 7                             |\n| NUM_DVDA          | Number deaths from all doses                               | NUM_VDA               | Total number of all vax doses (sum)                   |\n\u003cbr\u003e\n\nUses real Czech FOI (Freedom of Information) data, to calculate normalized death rates and all doses given curves. \n[Python Scripts](https://github.com/gitfrid/CzechFOI-StackSim/tree/main/Py%20Scripts) process and visualize CSV data from the [TERRA folder](https://github.com/gitfrid/CzechFOI-StackSim/tree/main/TERRA), generating interactive HTML plots. To interact with the plots, click on a legend entry to show/hide curves.\n\nDownload the processed plots for analysis from the [Plot Results Folder](https://github.com/gitfrid/CzechFOI-StackSim/tree/main/Plot%20Results). \n\nDates are counted as the number of days since [January 1, 2020](https://github.com/gitfrid/CzechFOI-StackSim/blob/main/Plot%20Results/Days%20to%20Date%20Translation%20Day%20Date%20Translation/Days%20to%20Date%20Translation%20Day%20Date%20Translation.png), for easier processing. \"AGE_2023\" represents age on January 1, 2023. \u003cbr\u003eThe data are optionally normalized per 100,000 for comparison.\n\nAccess the original Czech FOI data from a [Freedom of Information request](https://github.com/PalackyUniversity/uzis-data-analysis/blob/main/data/Vesely_106_202403141131.tar.xz). To learn how the Pivot CSV files in the TERRA folder were created, see the [wiki](https://github.com/gitfrid/CzechFOI-DA/wiki)\n_________________________________________\n\n### Software Requirements:\n- [Python 3.12.5](https://www.python.org/downloads/) to run the scripts.\n- [Visual Studio Code 1.92.2](https://code.visualstudio.com/download) to edit and run scripts.\n- [Optional - DB Browser for SQLite 3.13.0](https://sqlitebrowser.org/dl/) for database creation, SQL queries, and CSV export.\n\n### Disclaimer:\n**The results have not been checked for errors. Neither methodological nor technical checks or data cleansing have been performed.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitfrid%2Fczechfoi-stacksim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitfrid%2Fczechfoi-stacksim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitfrid%2Fczechfoi-stacksim/lists"}