The user should always use Ez.eqn9.supp()
, which is a wrapper
for Ez.eqn9.supp.vector()
. The forms differ in their treatment
of \(\theta\). In the former, \(\theta\) must be a
vector; in the latter, \(\theta\) may be a matrix, in which
case Ez.eqn9.supp.vector()
is applied to the rows.
Note that Ez.eqn9.supp.vector()
is vectorized in x
but
not \(\theta\) (if given a multi-row object,
apply(theta,1,...)
is used to evaluate the function for each
row supplied).
Function Ez.eqn9.supp()
will take multiple-row arguments for
x
and theta
. The output will be a matrix, with rows
corresponding to the rows of x
and columns corresponding to the
rows of theta
. See the third example below.
Note that function Ez.eqn9.supp()
determines whether there are
multiple values of \(\theta\) by is.vector(theta)
. If
this returns TRUE
, it is assumed that \(\theta\) is a
single point in multidimensional parameter space; if FALSE
, it
is assumed to be a matrix whose rows correspond to points in parameter
space.
So if \(\theta\) is one dimensional, calling
Ez.eqn9.supp()
with a vector-valued \(\theta\) will
fail because the function will assume that \(\theta\) is a
single, multidimensional, point. To get round this, use
as.matrix(theta)
, which is not a vector; the rows are the (1D)
parameter values.