https://github.com/cran/GAS
Raw File
Tip revision: a8fe17c38002b26ca09b18984573c71a54efede6 authored by Leopoldo Catania on 12 June 2017, 21:08:21 UTC
version 0.2.1
Tip revision: a8fe17c
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