coefxiv | R Documentation |
Given a linear DAG, find the population regression coefficient for X using IV estimation using data with the marginal covariance structure implied by the linear DAG.
coefxiv(fmla, dag, iv = NULL, var = covld(to_dag(dag)))
fmla |
a linear model formula. The variables
in the formula must be column names of
|
dag |
a square matrix defining a linear DAG. The
column names and row names of A must be
identical. The non-diagonal entries of
|
iv |
a one-sided formula with a single variable (at present) specifying a variable to be used as an instrumental variable |
var |
the variance matrix of the variables, as an alternative input to 'dag'. If 'var' is provided, then dag does not need to be provided. |
a list with class 'coefx' containing
the population coefficient for the first
predictor variable in fmla
, the residual
standard error of the regression, the conditional
standard deviation of the residual of the first
predictor and the ratio of the last two quantities
which constitutes the 'standard error factor' which,
if multiplied by 1/sqrt(n) is an estimate of the
standard error of the estimate of the regression
coefficient for the first predictor variable.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.