R/mapping_ucminf.R

Defines functions difLBETA LBETA difLZIP LZIP difLCNORMss difLCNORM LCNORM difLLOGIT LLOGIT

# LOGIT
LLOGIT <- function(x, ng, nx, n, A, Y, X, nbeta, nw, TCOV) {
  lik <- -likelihoodLOGIT_cpp(
    x,
    ng = ng,
    nx = nx,
    n = n,
    A = A,
    Y = Y,
    X = X,
    nbeta = nbeta,
    nw = nw,
    TCOV = TCOV
  )
  return(lik)
}
difLLOGIT <- function(x, ng, nx, n, A, Y, X, nbeta, nw, TCOV) {
  return(
    -difLLOGIT_cpp(
      x,
      ng = ng,
      nx = nx,
      n = n,
      A = A,
      Y = Y,
      X = X,
      nbeta = nbeta,
      nw = nw,
      TCOV = TCOV
    )
  )
}

# CNORM
LCNORM <- function(x, ng, nx, n, A, Y, X, nbeta, nw, TCOV, ymin, ymax, ssigma) {
  lik <- -Likelihoodalpha_cpp(
    x,
    ng = ng,
    nx = nx,
    n = n,
    A = A,
    Y = Y,
    X = X,
    nbeta = nbeta,
    ymin = ymin,
    ymax = ymax,
    nw = nw,
    TCOV = TCOV,
    ssigma = ssigma
  )
  return(lik)
}
difLCNORM <- function(
  x,
  ng,
  nx,
  n,
  A,
  Y,
  X,
  nbeta,
  nw,
  TCOV,
  ymin,
  ymax,
  ssigma
) {
  return(
    -difLalpha_cpp(
      x,
      ng = ng,
      nx = nx,
      n = n,
      A = A,
      Y = Y,
      X = X,
      nbeta = nbeta,
      ymin = ymin,
      ymax = ymax,
      nw = nw,
      TCOV = TCOV,
      ssigma = ssigma
    )
  )
}
# CNORM same sigma
difLCNORMss <- function(
  x,
  ng,
  nx,
  n,
  A,
  Y,
  X,
  nbeta,
  nw,
  TCOV,
  ymin,
  ymax,
  ssigma
) {
  return(
    -difLalphaunique_cpp(
      x,
      ng = ng,
      nx = nx,
      n = n,
      A = A,
      Y = Y,
      X = X,
      nbeta = nbeta,
      ymin = ymin,
      ymax = ymax,
      nw = nw,
      TCOV = TCOV,
      ssigma = ssigma
    )
  )
}

# ZIP
LZIP <- function(x, ng, nx, n, A, Y, X, nbeta, nnu, nw, TCOV) {
  lik <- -likelihoodZIP_cpp(
    x,
    ng = ng,
    nx = nx,
    n = n,
    A = A,
    Y = Y,
    X = X,
    nbeta = nbeta,
    nnu = nnu,
    nw = nw,
    TCOV = TCOV
  )
  return(lik)
}
difLZIP <- function(x, ng, nx, n, A, Y, X, nbeta, nnu, nw, TCOV) {
  return(
    -difLZIP_cpp(
      x,
      ng = ng,
      nx = nx,
      n = n,
      A = A,
      Y = Y,
      X = X,
      nbeta = nbeta,
      nnu = nnu,
      nw = nw,
      TCOV = TCOV
    )
  )
}

# BETA
LBETA <- function(x, ng, nx, n, A, Y, X, nbeta, nphi, nw, TCOV) {
  lik <- -LikelihoodBETA_cpp(
    x,
    ng = ng,
    nx = nx,
    n = n,
    A = A,
    Y = Y,
    X = X,
    nbeta = nbeta,
    nphi = nphi,
    nw = nw,
    TCOV = TCOV
  )
  return(lik)
}
difLBETA <- function(x, ng, nx, n, A, Y, X, nbeta, nphi, nw, TCOV) {
  return(
    -difLBETA_cpp(
      x,
      ng = ng,
      nx = nx,
      n = n,
      A = A,
      Y = Y,
      X = X,
      nbeta = nbeta,
      nphi = nphi,
      nw = nw,
      TCOV = TCOV
    )
  )
}

Try the trajeR package in your browser

Any scripts or data that you put into this service are public.

trajeR documentation built on Aug. 4, 2026, 1:09 a.m.