> For the complete documentation index, see [llms.txt](https://globalimpact.gitbook.io/untitled/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://globalimpact.gitbook.io/untitled/methodological-discussion/analysis-statistical-approaches.md).

# Analysis: Statistical approaches

## Impact of treatment on 'rare event' incidence

*Notes from slack:*

> I’m finding some issues like this in analyzing rare events … not quite that rare, but still a few per thousand or a few per hundred.
>
> I’m taking 2 statistical approaches to the analysis (discussion, code, and data in links):

1. [Bayesian binomial-beta (a pretty standard setup I’m probably making overcomplicated)](https://daaronr.github.io/dualprocess/analysis-questions-and-tests.html#bayes_prop)
2. Randomization inference (simulation) … for a sort of [equivalence testing here](https://rethinkpriorities.github.io/methodology-statistics-design/inference-and-rough-equivalence-testing-with-binomial-outcomes.html#how-likely-are-proportions-this-similar-under-different-size-true-effect-sizes)

> I think either of these could be ‘flipped around’ to be used for power calculation or ‘the Bayesian equivalent of power calculation’

> My colleague Jamie Elsey has some expertise with the latter; [we’re putting together our discussion HERE](https://rethinkpriorities.github.io/methodology-statistics-design/power-workflow.html), although it’s mainly frequentist and not Bayesian ATM.

## Open and robust science: Preregistration and Preanalysis plans

There are reasons 'some pre-registration' or at least 'declaring your intentions in advance' is worth doing even if you aren't aiming at scientific publication

## Which statistical tests/methods

<https://gitlab.com/dsbowen/conditional-inference/-/blob/master/examples/bayes_primer.ipynb>

## [From Sample to Population: Multilevel Regression and Poststratification (MRP) and Survey Weighting](https://docs.google.com/document/d/14uTZqOpnKAK8_oRwgqlAhEXfyQPQUKK9/edit)

{% embed url="<https://docs.google.com/document/d/14uTZqOpnKAK8_oRwgqlAhEXfyQPQUKK9/edit>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://globalimpact.gitbook.io/untitled/methodological-discussion/analysis-statistical-approaches.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
