Interface to C++ Log-Likelihood Implementation
This is the main computation engine wrapped by opsr.fit
.
loglik_cpp(theta, W, X, Y, weights, nReg, nThreads)
theta
: named coefficient vector as parsed from formula interface opsr
.W
: list of matrices with explanatory variables for selection process for each regime.X
: list of matrices with expalanatory varialbes for outcome process for each regime.Y
: list of vectors with continuous outcomes for each regime.weights
: vector of weights. See also opsr
.nReg
: integer number of regimes.nThreads
: number of threads to be used by OpenMP
(should be max. nReg
).Numeric vector of (weighted) log-likelihood contributions.
opsr.fit
, loglik_R