In Stata how to perform one-sample Mendelian randomization using the Wald ratio method for causal estimates, SE and P value? Is there a package or special command?
Essentially I want to perform regression of A on X, and then regression of B on X and then I want to calculate
- B coefficient = B-coefficient of (A on X) divided by B-coefficient of (B on X)
- The SE is a complicated formula including the square root of the sum of the (SE/B coefficient) of each of the 2 regressions ... perhaps there could be a formula I could use to derive this from the linear regressions?
Currently I'm manually using linear regression and reading off the B and SE estimates. However it's onerous doing this for every outcome and exposure