// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#include <RcppArmadillo.h>
#include <Rcpp.h>

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>&  Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// BiARfit
List BiARfit(arma::vec coef, arma::vec series1, arma::vec series2, arma::vec times, arma::vec series_esd1, arma::vec series_esd2, bool zero_mean);
RcppExport SEXP _iAR_BiARfit(SEXP coefSEXP, SEXP series1SEXP, SEXP series2SEXP, SEXP timesSEXP, SEXP series_esd1SEXP, SEXP series_esd2SEXP, SEXP zero_meanSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type coef(coefSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series1(series1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series2(series2SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type times(timesSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series_esd1(series_esd1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series_esd2(series_esd2SEXP);
    Rcpp::traits::input_parameter< bool >::type zero_mean(zero_meanSEXP);
    rcpp_result_gen = Rcpp::wrap(BiARfit(coef, series1, series2, times, series_esd1, series_esd2, zero_mean));
    return rcpp_result_gen;
END_RCPP
}
// BiARforecast
List BiARforecast(arma::vec coef, arma::vec series1, arma::vec series2, arma::vec times, double tAhead);
RcppExport SEXP _iAR_BiARforecast(SEXP coefSEXP, SEXP series1SEXP, SEXP series2SEXP, SEXP timesSEXP, SEXP tAheadSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type coef(coefSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series1(series1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series2(series2SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type times(timesSEXP);
    Rcpp::traits::input_parameter< double >::type tAhead(tAheadSEXP);
    rcpp_result_gen = Rcpp::wrap(BiARforecast(coef, series1, series2, times, tAhead));
    return rcpp_result_gen;
END_RCPP
}
// BiARphikalman
double BiARphikalman(arma::vec yest, arma::vec coef, arma::vec series1, arma::vec series2, arma::vec times, arma::vec series_esd1, arma::vec series_esd2, bool zero_mean);
RcppExport SEXP _iAR_BiARphikalman(SEXP yestSEXP, SEXP coefSEXP, SEXP series1SEXP, SEXP series2SEXP, SEXP timesSEXP, SEXP series_esd1SEXP, SEXP series_esd2SEXP, SEXP zero_meanSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type yest(yestSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type coef(coefSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series1(series1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series2(series2SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type times(timesSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series_esd1(series_esd1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series_esd2(series_esd2SEXP);
    Rcpp::traits::input_parameter< bool >::type zero_mean(zero_meanSEXP);
    rcpp_result_gen = Rcpp::wrap(BiARphikalman(yest, coef, series1, series2, times, series_esd1, series_esd2, zero_mean));
    return rcpp_result_gen;
END_RCPP
}
// CiARfit
List CiARfit(arma::vec coef, arma::vec series, arma::vec times, bool zero_mean, bool standardized, double c);
RcppExport SEXP _iAR_CiARfit(SEXP coefSEXP, SEXP seriesSEXP, SEXP timesSEXP, SEXP zero_meanSEXP, SEXP standardizedSEXP, SEXP cSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type coef(coefSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series(seriesSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type times(timesSEXP);
    Rcpp::traits::input_parameter< bool >::type zero_mean(zero_meanSEXP);
    Rcpp::traits::input_parameter< bool >::type standardized(standardizedSEXP);
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    rcpp_result_gen = Rcpp::wrap(CiARfit(coef, series, times, zero_mean, standardized, c));
    return rcpp_result_gen;
END_RCPP
}
// CiARforecast
List CiARforecast(arma::vec coef, arma::vec series, arma::vec times, double tAhead, bool zero_mean, bool standardized);
RcppExport SEXP _iAR_CiARforecast(SEXP coefSEXP, SEXP seriesSEXP, SEXP timesSEXP, SEXP tAheadSEXP, SEXP zero_meanSEXP, SEXP standardizedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type coef(coefSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series(seriesSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type times(timesSEXP);
    Rcpp::traits::input_parameter< double >::type tAhead(tAheadSEXP);
    Rcpp::traits::input_parameter< bool >::type zero_mean(zero_meanSEXP);
    Rcpp::traits::input_parameter< bool >::type standardized(standardizedSEXP);
    rcpp_result_gen = Rcpp::wrap(CiARforecast(coef, series, times, tAhead, zero_mean, standardized));
    return rcpp_result_gen;
END_RCPP
}
// CiARphikalman
double CiARphikalman(arma::vec yest, arma::vec coef, arma::vec series, arma::vec times, arma::vec series_esd, bool zero_mean, bool standardized, double c);
RcppExport SEXP _iAR_CiARphikalman(SEXP yestSEXP, SEXP coefSEXP, SEXP seriesSEXP, SEXP timesSEXP, SEXP series_esdSEXP, SEXP zero_meanSEXP, SEXP standardizedSEXP, SEXP cSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type yest(yestSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type coef(coefSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series(seriesSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type times(timesSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series_esd(series_esdSEXP);
    Rcpp::traits::input_parameter< bool >::type zero_mean(zero_meanSEXP);
    Rcpp::traits::input_parameter< bool >::type standardized(standardizedSEXP);
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    rcpp_result_gen = Rcpp::wrap(CiARphikalman(yest, coef, series, times, series_esd, zero_mean, standardized, c));
    return rcpp_result_gen;
END_RCPP
}
// CiARsample
List CiARsample(double phiR, double phiI, arma::vec times, int rho, int c);
RcppExport SEXP _iAR_CiARsample(SEXP phiRSEXP, SEXP phiISEXP, SEXP timesSEXP, SEXP rhoSEXP, SEXP cSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type phiR(phiRSEXP);
    Rcpp::traits::input_parameter< double >::type phiI(phiISEXP);
    Rcpp::traits::input_parameter< arma::vec >::type times(timesSEXP);
    Rcpp::traits::input_parameter< int >::type rho(rhoSEXP);
    Rcpp::traits::input_parameter< int >::type c(cSEXP);
    rcpp_result_gen = Rcpp::wrap(CiARsample(phiR, phiI, times, rho, c));
    return rcpp_result_gen;
END_RCPP
}
// iARgsample
List iARgsample(double coef, arma::vec times, double sigma, double mean);
RcppExport SEXP _iAR_iARgsample(SEXP coefSEXP, SEXP timesSEXP, SEXP sigmaSEXP, SEXP meanSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type coef(coefSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type times(timesSEXP);
    Rcpp::traits::input_parameter< double >::type sigma(sigmaSEXP);
    Rcpp::traits::input_parameter< double >::type mean(meanSEXP);
    rcpp_result_gen = Rcpp::wrap(iARgsample(coef, times, sigma, mean));
    return rcpp_result_gen;
END_RCPP
}
// iARphigamma
double iARphigamma(arma::vec yest, arma::vec coef, arma::vec series, arma::vec times);
RcppExport SEXP _iAR_iARphigamma(SEXP yestSEXP, SEXP coefSEXP, SEXP seriesSEXP, SEXP timesSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type yest(yestSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type coef(coefSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series(seriesSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type times(timesSEXP);
    rcpp_result_gen = Rcpp::wrap(iARphigamma(yest, coef, series, times));
    return rcpp_result_gen;
END_RCPP
}
// iARphikalman
double iARphikalman(arma::vec yest, double coef, arma::vec series, arma::vec series_esd, arma::vec times, bool zero_mean, bool standardized);
RcppExport SEXP _iAR_iARphikalman(SEXP yestSEXP, SEXP coefSEXP, SEXP seriesSEXP, SEXP series_esdSEXP, SEXP timesSEXP, SEXP zero_meanSEXP, SEXP standardizedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type yest(yestSEXP);
    Rcpp::traits::input_parameter< double >::type coef(coefSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series(seriesSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series_esd(series_esdSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type times(timesSEXP);
    Rcpp::traits::input_parameter< bool >::type zero_mean(zero_meanSEXP);
    Rcpp::traits::input_parameter< bool >::type standardized(standardizedSEXP);
    rcpp_result_gen = Rcpp::wrap(iARphikalman(yest, coef, series, series_esd, times, zero_mean, standardized));
    return rcpp_result_gen;
END_RCPP
}
// iARphiloglik
double iARphiloglik(double coef, arma::vec series, arma::vec times, arma::vec series_esd, bool zero_mean, bool standardized);
RcppExport SEXP _iAR_iARphiloglik(SEXP coefSEXP, SEXP seriesSEXP, SEXP timesSEXP, SEXP series_esdSEXP, SEXP zero_meanSEXP, SEXP standardizedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type coef(coefSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series(seriesSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type times(timesSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series_esd(series_esdSEXP);
    Rcpp::traits::input_parameter< bool >::type zero_mean(zero_meanSEXP);
    Rcpp::traits::input_parameter< bool >::type standardized(standardizedSEXP);
    rcpp_result_gen = Rcpp::wrap(iARphiloglik(coef, series, times, series_esd, zero_mean, standardized));
    return rcpp_result_gen;
END_RCPP
}
// iARphit
double iARphit(arma::vec yest, arma::vec coef, arma::vec series, arma::vec times, double df);
RcppExport SEXP _iAR_iARphit(SEXP yestSEXP, SEXP coefSEXP, SEXP seriesSEXP, SEXP timesSEXP, SEXP dfSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type yest(yestSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type coef(coefSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type series(seriesSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type times(timesSEXP);
    Rcpp::traits::input_parameter< double >::type df(dfSEXP);
    rcpp_result_gen = Rcpp::wrap(iARphit(yest, coef, series, times, df));
    return rcpp_result_gen;
END_RCPP
}
// iARsample
List iARsample(double coef, arma::vec times);
RcppExport SEXP _iAR_iARsample(SEXP coefSEXP, SEXP timesSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type coef(coefSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type times(timesSEXP);
    rcpp_result_gen = Rcpp::wrap(iARsample(coef, times));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_iAR_BiARfit", (DL_FUNC) &_iAR_BiARfit, 7},
    {"_iAR_BiARforecast", (DL_FUNC) &_iAR_BiARforecast, 5},
    {"_iAR_BiARphikalman", (DL_FUNC) &_iAR_BiARphikalman, 8},
    {"_iAR_CiARfit", (DL_FUNC) &_iAR_CiARfit, 6},
    {"_iAR_CiARforecast", (DL_FUNC) &_iAR_CiARforecast, 6},
    {"_iAR_CiARphikalman", (DL_FUNC) &_iAR_CiARphikalman, 8},
    {"_iAR_CiARsample", (DL_FUNC) &_iAR_CiARsample, 5},
    {"_iAR_iARgsample", (DL_FUNC) &_iAR_iARgsample, 4},
    {"_iAR_iARphigamma", (DL_FUNC) &_iAR_iARphigamma, 4},
    {"_iAR_iARphikalman", (DL_FUNC) &_iAR_iARphikalman, 7},
    {"_iAR_iARphiloglik", (DL_FUNC) &_iAR_iARphiloglik, 6},
    {"_iAR_iARphit", (DL_FUNC) &_iAR_iARphit, 5},
    {"_iAR_iARsample", (DL_FUNC) &_iAR_iARsample, 2},
    {NULL, NULL, 0}
};

RcppExport void R_init_iAR(DllInfo *dll) {
    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
    R_useDynamicSymbols(dll, FALSE);
}
