https://github.com/cran/GAS
Raw File
Tip revision: e588e3a10bf22cb7dff4a49a848baac63d743c3f authored by Leopoldo Catania on 04 February 2022, 09:30:12 UTC
version 0.3.4
Tip revision: e588e3a
IMWrap.cpp
#include <RcppArmadillo.h>
#include "norm.h"
#include "snorm.h"
#include "std.h"
#include "sstd.h"
#include "ast.h"
#include "ald.h"
#include "poi.h"
#include "ber.h"
#include "gamma.h"
#include "exp.h"
#include "beta.h"
#include "negbin.h"
#include "skellam.h"


using namespace Rcpp;
using namespace arma;

//[[Rcpp::export]]
arma::mat IM_univ(arma::vec vTheta,std::string Dist){
  arma::mat mIM;
  if(Dist == "norm") mIM = norm_IM(vTheta);
  if(Dist == "snorm") mIM = snorm_IM(vTheta);
  if(Dist == "std")  mIM = std_IM(vTheta);
  if(Dist == "sstd")  mIM = sstd_IM(vTheta);
  if(Dist == "ast")  mIM = ast_IM(vTheta);
  if(Dist == "ast1") mIM = ast1_IM(vTheta);
  if(Dist == "ald") mIM = ald_IM(vTheta);
  if(Dist == "poi")  mIM = poi_IM(vTheta(0));
  if(Dist == "ber")  mIM = ber_IM(vTheta(0));
  if(Dist == "gamma") mIM = gamma_IM(vTheta);
  if(Dist == "exp")  mIM = exp_IM(vTheta(0));
  if(Dist == "beta") mIM = beta_IM(vTheta);
  if(Dist == "negbin") mIM = negbin_IM(vTheta);
  if(Dist == "skellam") mIM = skellam_IM(vTheta);
  return mIM;
}

back to top