View source: R/nlme_summ_aes.r
iv_free | R Documentation |
iv_free computes the IV-free exposure.
iv_free(y, x, g, covar = NULL, q = 10, family = "gaussian", controlsonly = T)
y |
vector of outcome values. |
x |
vector of exposure values. |
g |
the instrumental variable. |
covar |
a matrix of covariates. |
q |
the number of quantiles the exposure distribution is to be split into. The default is deciles (i.e. 10 quantiles). |
family |
a description of the error distribution and link function to be used in the model (either "gaussian" or "binomial" can be specified). |
controlsonly |
whether to estimate the gx association in all people, or in controls only. This is set to TRUE by default, but has no effect if family is gaussian. |
xcoef |
the association between the exposure and the instrument |
x0 |
the IV-free exposure. |
x0q |
the quantiles of x0. |
Amy Mason am2609@medschl.cam.ac.uk based on similar function in nlmr by James R Staley
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.