The function waldtest
computes a Wald test for the H0: R beta = r,
where beta is the estimated vector coef(object)
.
If R
is a character, integer, or logical vector it is assumed to
specify a matrix which merely picks out a subset of the coefficients for
joint testing. If r
is not specified, it is assumed to be a zero
vector of the appropriate length.
R
can also be a formula which is linear in the estimated
coefficients, e.g. of the type ~Q-2|x-2*z
which will test the joint
hypothesis Q=2 and x=2*z.
If R
is a function (of the coefficients), an approximate Wald test
against H0: R(beta) == 0
, using the Delta-method, is computed.
In case of an IV-estimation, the names for the endogenous variables in
coef(object)
are of the type "
Q(fit)"
which is a bit dull to
type; if all the endogenous variables are to be tested they can be specified
as "endovars"
. It is also possible to specify an endogenous variable
simply as "Q"
, and waldtest
will add the other syntactic sugar
to obtain "
Q(fit)"
.
The type
argument works as follows. If type=='default'
it is
assumed that the residuals are i.i.d., unless a cluster structure was
specified to felm()
. If type=='robust'
, a heteroscedastic
structure is assumed, even if a cluster structure was specified in
felm()
.