Description Usage Arguments Value Examples
Calculate the Cragg-Donald statistic for a given model.
1 | cragg_donald(X, D, Z, data = data.frame())
|
X |
(formula). A one-sided formula of control variables. |
D |
(formula). A one-sided formula of endogenous variables (treatments) |
Z |
(formula). A one-sided formula of instruments |
data |
(dataframe). An optional dataframe, list, or environment containing the variables used in the model. As with many of the base R functions, if the variables are not found here, they may be searched for in the environment cragg_donald() was called. |
(cd_test) results object of class "cd_test"
1 2 3 4 5 | #Obtain the Cragg-Donald statistic for a model that instruments
#Sepal Width on Petal Length, Petal Width, and Species, while controlling
#for Sepal.Length (a toy example).
cragg_donald(X=~Sepal.Length, D=~Sepal.Width,
Z=~Petal.Length + Petal.Width + Species, data = iris)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.