This is the basic computing engine called by opsr used to fit ordinal
probit switching regression models. Should usually not be used directly.
The log-likelihood function is implemented in C++ which yields a considerable
speed-up. Parallel computation is implemented using OpenMP.
opsr.fit(
Ws,
Xs,
Ys,
start,
fixed,
weights,
method,
iterlim,
printLevel,
nThreads,
.useR = FALSE,
.loglik = FALSE,
...
)object of class "maxLik" "maxim".
list of matrices with explanatory variables for selection process for each regime.
list of matrices with expalanatory varialbes for outcome process for each regime.
list of vectors with continuous outcomes for each regime.
a numeric vector with the starting values (passed to maxLik::maxLik).
parameters to be treated as constants at their start values. If
present, it is treated as an index vector of start parameters (passed to maxLik::maxLik).
a vector of weights to be used in the fitting process. Has to
conform with order (w <- weights[order(Z)], where Z is the ordinal
outcome).
maximzation method (passed to maxLik::maxLik).
maximum number of iterations (passed to maxLik::maxLik).
larger number prints more working information (passed to maxLik::maxLik).
number of threads to be used. Do not pass higher number than
number of ordinal outcomes. See also opsr_check_omp and opsr_max_threads.
if TRUE, usese loglik_R. Go grab a coffe.
if TRUE, returns the vector of log-likelihood values given
the parameters passed via start.
further arguments passed to maxLik::maxLik.
maxLik::maxLik, loglik_cpp, opsr