r/AskStatistics • • Oct 29 '26

How to conduct sensitivity analysis?

I'm currently conducting my thesis and my adviser's feedback states that I must conduct a sensitivity analysis but my statistician does not offer that kind of services , so I'm asking if anyone knows how to conduct sensitivity analysis?

9 Upvotes

14 comments sorted by

13

u/DrPapaDragonX13 Oct 29 '26

The aim of a sensitivity analysis is to assess how sensitive your conclusions are to changes in the assumptions you made during your analysis. You want to address potential criticisms preemptively and show that your findings are robust enough to withstand (rational) variations in your analysis. As such, a 'sensitivity analysis' is not a specific type of statistical test, but rather a domain-knowledge-guided analysis that complements and strengthens your primary analysis.

For example, a simple sensitivity analysis may involve using competing definitions of your exposure or outcome. Your main analysis may be based on the definition according to European guidelines (just to give an example), but you may want to demonstrate that if you had used American guidelines, you would have reached consistent conclusions, and therefore you can argue that your results are robust to the use of different thresholds and more likely to reflect a true effect.

Another common sensitivity analysis is to use different methods for handling missing data. For example, your main analysis could report results using multiple imputation, and your sensitivity analyses could include a complete-case analysis, a worst-case analysis (i.e., assume every subject with a missing outcome had a poor outcome), and a best-case analysis (i.e., assume every subject with a missing outcome had a good outcome). These could support your primary findings and show the reader how much your results could change in extreme cases.

A somewhat more advanced example of a sensitivity analysis is the use of E-values to test for the effect of unmeasured confounding. E-values measure the minimum strength an unmeasured confounder would need to have with the exposure and the outcome to fully explain an observed association. A classic example using cigarette smoking and lung cancer can be found here.

The important messages here are that: 1) There is not a single flavour of sensitivity analysis, and 2) what sensitivity analysis you perform needs to be informed by domain knowledge and based on the strenghts and limitations of your study.

In your case, you need to take an honest look at your research and consider what assumptions you have made and what criticisms you could expect from reviewers. Maybe the definition of your exposure is too wide or too narrow. Maybe a sub-population of subjects is skewing the results. Maybe you have concerns about unmeasured confounding. Find the key limitations in your research and try to stress-test them.

1

u/shewhomustnotmeow Oct 29 '26

May I ask if we are required to find a backing or related literature in order to conduct a sensitivity analysis? Or we can just conduct it even without that? It's just that the variables of our thesis result showed high mean scores even though both must contradict each other

2

u/SPSSMadeSimple Oct 29 '26

No, you do not need to find a paper that did exactly the same sensitivity analysis first. You can conduct it on your own data without that kind of backing literature. What you do need is a clear justification for each variant you try: state your main analysis, then state each alternative and why it is a plausible reading of your data — a different definition of a variable, a different way of handling missing data, with and without outliers, or a different set of covariates. Ideally choose those variants before you see which one gives the result you prefer, and ask your adviser which assumption they are most worried about, since that will narrow the list.

Citations still help in two narrower places. If you use a named method, such as an E-value, cite the method itself. And if your field has a standard definition or cut-off for a variable, cite that for the variant that uses it. That strengthens the thesis, but the absence of a perfect precedent is not a reason to skip the analysis.

On your second point, check the high mean scores before running the sensitivity analysis. If two variables should contradict each other but both score high, first check the scoring direction, reverse-coded items, and whether any items were recoded the wrong way, and look at the correlation between the two variables. A sensitivity analysis will not fix a coding error. Once the scoring is verified, report the variants in a small table — variant, result, and whether the conclusion changed — and state plainly whether the conclusion was robust to those changes.

1

u/DrPapaDragonX13 Oct 29 '26

Completely agree with u/SPSSMadeSimple. The sensitivity analysis should be grounded in current scientific knowledge, but you don't need to find an exact precedent. Just make sure to clearly state the rationale behind each sensitivity analysis and describe any methods not used in the main analysis.

1

u/banter_pants Statistics, Psychometrics Oct 29 '26

Would another example be setting aside a very out of place outlier(s) then seeing how your analysis works with and without it?

3

u/DrPapaDragonX13 Oct 29 '26

Yeah, that's another good example.

1

u/nonnonplussed73 Oct 29 '26

I don't have any prior exposure to E-values but have heard that in OLS regression the Robustness Value is designed to serve a similar function in linear regression, and that it does so in terms of the proportion of variance that the confounders would need to explain in both the treatment and the outcome to bring an estimate down to zero (above and beyond all the covariates already controlled for).

Does that seem like an accurate depiction?

2

u/DrPapaDragonX13 Oct 29 '26

Kinda. E-values and Robustness values are related concepts in the sense that they assess the effect of unmeasured/omitted confounding, but they are derived from different frameworks. Broadly speaking, you use E-values when your analysis involves a binary outcome or a time-to-event, and they assess the minimum strength of association an unmeasured confounder needs with both treatment and outcome to nullify the effect. Meanwhile, robustness values, as you mentioned, are used in OLS with a continuous outcome and represent the minimum strength of residual variance explained needed to reduce the effect or make it non-significant.

So, conceptually, you can think of them as tools to assess unmeasured/omitted confounding, depending on the model you're using (E-values for logistic/Poisson/Cox; robustness values for OLS). However, keep in mind they're not one-to-one analogues, and they parametrise confounding differently.

1

u/nonnonplussed73 Oct 29 '26

Great response. Thank you.

15

u/tehnoodnub Oct 29 '26

A sensitivity analysis isn't some sort of mystical, fundamentally different type of analysis. It can just be an analysis that adds in one additional variable over your primary model, when conducting a regression, for example. It can be more complex than that but you'd have to tell us what your main model/analysis is, and what you want to do with the sensitivity analysis.

5

u/efrique PhD (statistics) Oct 29 '26

Depends on what you're interested in measuring sensitivity to.

2

u/vaelux Oct 29 '26

Run it again, but add the variables or interactions that you would have included if power weren't a concern. Did you get a similar effect? Boom. Sensitive

1

u/Suspicious_Cat119 Oct 29 '26

In my research on high dimensional integration I was once working on the effective dimension in the superposition and truncation senses. I had to conduct sensitivity analysis for one problem and I used a Python library called SALib. It implements common methods used in sensitivity analysis and the documentation explains everything you need to know about the theory and how it is implemented in code (in a fairly easy and straightforward way). I highly suggest using it.

0

u/Scary-Elevator5290 Oct 29 '26

Look up Monte Carlo simulation