loglik_cpp function

Interface to C++ Log-Likelihood Implementation

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)

Arguments

  • 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).

Returns

Numeric vector of (weighted) log-likelihood contributions.

See Also

opsr.fit, loglik_R

  • Maintainer: Daniel Heimgartner
  • License: GPL (>= 3)
  • Last published: 2024-11-01