opsr.fit {OPSR} | R Documentation |
Fitter Function for Ordered Probit Switching Regression Models
Description
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
.
Usage
opsr.fit(
Ws,
Xs,
Ys,
start,
fixed,
weights,
method,
iterlim,
printLevel,
nThreads,
.useR = FALSE,
.loglik = FALSE,
...
)
Arguments
Ws |
list of matrices with explanatory variables for selection process for each regime. |
Xs |
list of matrices with expalanatory varialbes for outcome process for each regime. |
Ys |
list of vectors with continuous outcomes for each regime. |
start |
a numeric vector with the starting values (passed to |
fixed |
parameters to be treated as constants at their |
weights |
a vector of weights to be used in the fitting process. Has to
conform with order ( |
method |
maximzation method (passed to |
iterlim |
maximum number of iterations (passed to |
printLevel |
larger number prints more working information (passed to |
nThreads |
number of threads to be used. Do not pass higher number than
number of ordinal outcomes. See also |
.useR |
if |
.loglik |
if |
... |
further arguments passed to |
Value
object of class "maxLik" "maxim"
.
See Also
maxLik::maxLik
, loglik_cpp
, opsr