TScMLVar | R Documentation |
This function is for estimating corrected variance of estimated causal effect (i.e. beta) obtained from second stage. As described in our draft, the correction accounts for the effect of using reference panel.
TScMLVar(
Z.ref.original,
Stage1FittedModel,
betaalpha.hat.stage2,
Est.Sigma1Square,
Est.Sigma2Square,
n1,
n2,
n.ref
)
Z.ref.original |
The original reference panel, which is a n.ref (sample size of reference panel) by p (number of instruments) matrix. |
Stage1FittedModel |
A vector of length p, containing estimated effects from IVs to exposure obtained in the first stage model. |
betaalpha.hat.stage2 |
A vector of length (p+1), the first element is the estimated beta (causal effect from exposure to outcome), the rest p elements are estimated alpha's (direct effects from IVs to outcome). |
Est.Sigma1Square |
A number, estimated variance of random error in the first stage. |
Est.Sigma2Square |
A number, estimated variance of random error in the second stage. |
n1 |
Sample size in first stage. |
n2 |
Sample size in second stage. |
n.ref |
Sample size of reference panel. |
A number, which is the estimated corrected variance of estimated causal effect.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.