lace | R Documentation |
lace
computes the localised average causal effect
for each quantile.
lace(
y,
x,
g,
covar = NULL,
q,
x0q,
xc_sub = TRUE,
family = "gaussian",
xpos = "mean"
)
y |
vector of outcome values |
x |
vector of exposure values |
g |
the instrumental variable |
covar |
|
q |
the number of quantiles the exposure distribution is to be split
into within which a causal effect will be fitted, known as localised
average causal effects (LACE) (default: |
x0q |
quantiles of x0 (the IV-free exposure) |
xc_sub |
compute the association between the exposure and the insturment in each quantile of x0 |
family |
a description of the error distribution and link function
to be used in the model and is a |
xpos |
the position used to relate |
lace
returns a data.frame
of the LACE for quantile:
coef |
the LACE in each quantile |
coef_se |
the standard error of the LACE in each quantile |
xmean |
the mean of the exposure in each quantile |
xcoef_sub |
the association between the exposure and the instrument in each quantile |
xcoef_sub_se |
the standard error of the association between the exposure and the instrument in each quantile |
James Staley jrstaley95@gmail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.