ivDiag {ivgets} | R Documentation |
User diagnostics for getsFun() and isat()
Description
ivDiag
provides several diagnostic tests for 2SLS models that can be
used during model selection. Currently, a weak instrument F-test of the first
stage(s) and the Sargan test of overidentifying restrictions on the validity
of the instruments are implemented.
Usage
ivDiag(x, weak = FALSE, overid = FALSE)
Arguments
x |
A list containing the estimation results of the 2SLS model. Must
contain an entry |
weak |
A logical value whether to conduct weak instrument tests. |
overid |
A logical value whether to conduct the Sargan test of overidentifying restrictions. |
Details
The resulting matrix also has an attribute named
"is.reject.bad"
, which is a logical vector of length m. Each
entry records whether a rejection of the test means that the diagnostics
have failed or vice versa. The first entry refers to the first row, the
second entry to the second row etc. However, this attribute is not used in
the following estimations. Instead, the decision rule is specified inside
the user.fun
argument of gets::diagnostics()
, which allows for a
named entry $is.reject.bad
.
Value
Returns a matrix with three columns named "statistic"
,
"df"
, and "p-value"
and m rows. Each row records these
results for one of the tests, so the number of rows varies by the arguments
specified and the model (e.g. how many first stages equations there are).