R/TN_mom_Rcpp.R

Defines functions RcppKmomentN

RcppKmomentN = function(k,a,b,mu,Sigma)
{
  p = length(k)
  
  k = as.matrix(k)
  a = as.matrix(a)
  b = as.matrix(b)
  mu = as.matrix(mu)
  Sigma = as.matrix(Sigma)
  
  out = RcppmomentsN(k,a,b,mu,Sigma)
  mat  = data.frame(cbind(out$index,out$y),row.names = NULL)
  colnames(mat) = c(paste("k",seq(1,p),sep = ""),"E[k]")
  return(mat)
}

Try the MomTrunc package in your browser

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

MomTrunc documentation built on June 16, 2022, 1:06 a.m.