The expected response is the expected value of the dependent variable minus the individual effect and all the other variables times their estimated coefficients.
That is, if the variable is \(z_{k,it}\) in both \(x_{it}\) and \(z_{it}\),
then the function plots the surface of
$$y_{it} - \mu_i - \beta_{-k,0}' x_{-k,it} + \beta_{-k,1}' z_{-k,it} g_{it} - u_{it}$$
or simply
$$(\beta_{k,0} + \beta_{k,1}g_{it}) \cdot z_{k,it}$$
where \(-k\) means with the \(k\)th element removed,
against \(z_{k,it}\) and \(q_{it}\) if \(z_{k,it} \neq q_{it}\).
If \(z_{k,it} = q_{it}\), then the function plots the curve of the expected response defined above against \(z_{k,it}\).
More than one variable can be put in vars
.
If vars
contains the transition variable and the transition variable belongs to the nonlinear part,
the function will plot a curve of the effect-adjusted expected response and the transition variable,
otherwise, the function will plot a 3-D surface of the effect-adjusted expected response against a chosen variable in the nonlinear part and the transition variable.
length.out
takes a vector or a scalar.
The vector must be two dimensional specifying numbers of points in the grid built for the surface.
The first element of the vector corresponds to the variables, and the second to the transition variable.
If it is a scalar, then grid has the same number of points for the variables and the transition varible.
The return value is a list of the same length as vars
, whose elements are plottable objects.