The funciton uses the plotly
package to plot the 3-D surface of the target function for the nonlinear least square estimation.
The function takes the PSTR object as one of the inputs. The user needs to give the number of switches im
, and the transition variable iq
,
such that the target function values can be computed.
The number of parameters to estimate in the nonlinear least square estimation is 1+im
, that is, one smoothness parameter and the im
switching locations.
However, the 3-D plot is based on only two changing parameters with the others (if more than two parameters) constant. Thus, the user needs to input a vector par
,
which gives the values of the other parameters. Note that par
should still be of length 1+im
with the order \(\delta\) (always use delta in this function),
\(c_1\), ..., \(c_m\).
The user should give the vector basedon
of length two, that shows which two parameters will be used to build the grid.
basedon
gives the positions of the two parameters in par
. Thus, the values in the positions basedon
in par
will not be used.
from
, to
and length.out
serve to build the grid for the two parameters.
These arguments must be of length two for the two parameters, respectively.
See the seq
function for the details.