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

#include <RcppThread.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

// getCP
Rcpp::NumericVector getCP(const double INew, const int L, const double zL, const Rcpp::NumericVector& theta, const double IMax, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityTheta, const Rcpp::NumericVector& spendingTime, const bool MullerSchafer, const int kNew, const Rcpp::NumericVector& informationRatesNew, const Rcpp::LogicalVector& efficacyStoppingNew, const Rcpp::LogicalVector& futilityStoppingNew, const std::string& typeAlphaSpendingNew, const double parameterAlphaSpendingNew, const Rcpp::Nullable<Rcpp::NumericVector> futilityBoundsInt, const Rcpp::Nullable<Rcpp::NumericVector> futilityCPInt, const Rcpp::Nullable<Rcpp::NumericVector> futilityThetaInt, const std::string& typeBetaSpendingNew, const double parameterBetaSpendingNew, const Rcpp::NumericVector& spendingTimeNew, const double varianceRatio);
RcppExport SEXP _lrstat_getCP(SEXP INewSEXP, SEXP LSEXP, SEXP zLSEXP, SEXP thetaSEXP, SEXP IMaxSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityThetaSEXP, SEXP spendingTimeSEXP, SEXP MullerSchaferSEXP, SEXP kNewSEXP, SEXP informationRatesNewSEXP, SEXP efficacyStoppingNewSEXP, SEXP futilityStoppingNewSEXP, SEXP typeAlphaSpendingNewSEXP, SEXP parameterAlphaSpendingNewSEXP, SEXP futilityBoundsIntSEXP, SEXP futilityCPIntSEXP, SEXP futilityThetaIntSEXP, SEXP typeBetaSpendingNewSEXP, SEXP parameterBetaSpendingNewSEXP, SEXP spendingTimeNewSEXP, SEXP varianceRatioSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type INew(INewSEXP);
    Rcpp::traits::input_parameter< const int >::type L(LSEXP);
    Rcpp::traits::input_parameter< const double >::type zL(zLSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type theta(thetaSEXP);
    Rcpp::traits::input_parameter< const double >::type IMax(IMaxSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityTheta(futilityThetaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type MullerSchafer(MullerSchaferSEXP);
    Rcpp::traits::input_parameter< const int >::type kNew(kNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRatesNew(informationRatesNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStoppingNew(efficacyStoppingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStoppingNew(futilityStoppingNewSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpendingNew(typeAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpendingNew(parameterAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBoundsInt(futilityBoundsIntSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCPInt(futilityCPIntSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityThetaInt(futilityThetaIntSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpendingNew(typeBetaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpendingNew(parameterBetaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTimeNew(spendingTimeNewSEXP);
    Rcpp::traits::input_parameter< const double >::type varianceRatio(varianceRatioSEXP);
    rcpp_result_gen = Rcpp::wrap(getCP(INew, L, zL, theta, IMax, kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityTheta, spendingTime, MullerSchafer, kNew, informationRatesNew, efficacyStoppingNew, futilityStoppingNew, typeAlphaSpendingNew, parameterAlphaSpendingNew, futilityBoundsInt, futilityCPInt, futilityThetaInt, typeBetaSpendingNew, parameterBetaSpendingNew, spendingTimeNew, varianceRatio));
    return rcpp_result_gen;
END_RCPP
}
// getCP_mams
Rcpp::NumericVector getCP_mams(const double INew, const int M, const double r, const bool corr_known, const int L, const Rcpp::NumericVector& zL, const Rcpp::NumericVector& theta, const double IMax, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityTheta, const Rcpp::NumericVector& spendingTime, const bool MullerSchafer, const int MNew, const Rcpp::IntegerVector& selected, const double rNew, const int kNew, const Rcpp::NumericVector& informationRatesNew, const Rcpp::LogicalVector& efficacyStoppingNew, const Rcpp::LogicalVector& futilityStoppingNew, const std::string& typeAlphaSpendingNew, const double parameterAlphaSpendingNew, const Rcpp::Nullable<Rcpp::NumericVector> futilityBoundsInt, const Rcpp::Nullable<Rcpp::NumericVector> futilityCPInt, const Rcpp::Nullable<Rcpp::NumericVector> futilityThetaInt, const std::string& typeBetaSpendingNew, const double parameterBetaSpendingNew, const Rcpp::NumericVector& spendingTimeNew);
RcppExport SEXP _lrstat_getCP_mams(SEXP INewSEXP, SEXP MSEXP, SEXP rSEXP, SEXP corr_knownSEXP, SEXP LSEXP, SEXP zLSEXP, SEXP thetaSEXP, SEXP IMaxSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityThetaSEXP, SEXP spendingTimeSEXP, SEXP MullerSchaferSEXP, SEXP MNewSEXP, SEXP selectedSEXP, SEXP rNewSEXP, SEXP kNewSEXP, SEXP informationRatesNewSEXP, SEXP efficacyStoppingNewSEXP, SEXP futilityStoppingNewSEXP, SEXP typeAlphaSpendingNewSEXP, SEXP parameterAlphaSpendingNewSEXP, SEXP futilityBoundsIntSEXP, SEXP futilityCPIntSEXP, SEXP futilityThetaIntSEXP, SEXP typeBetaSpendingNewSEXP, SEXP parameterBetaSpendingNewSEXP, SEXP spendingTimeNewSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type INew(INewSEXP);
    Rcpp::traits::input_parameter< const int >::type M(MSEXP);
    Rcpp::traits::input_parameter< const double >::type r(rSEXP);
    Rcpp::traits::input_parameter< const bool >::type corr_known(corr_knownSEXP);
    Rcpp::traits::input_parameter< const int >::type L(LSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type zL(zLSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type theta(thetaSEXP);
    Rcpp::traits::input_parameter< const double >::type IMax(IMaxSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityTheta(futilityThetaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type MullerSchafer(MullerSchaferSEXP);
    Rcpp::traits::input_parameter< const int >::type MNew(MNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type selected(selectedSEXP);
    Rcpp::traits::input_parameter< const double >::type rNew(rNewSEXP);
    Rcpp::traits::input_parameter< const int >::type kNew(kNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRatesNew(informationRatesNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStoppingNew(efficacyStoppingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStoppingNew(futilityStoppingNewSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpendingNew(typeAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpendingNew(parameterAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBoundsInt(futilityBoundsIntSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCPInt(futilityCPIntSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityThetaInt(futilityThetaIntSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpendingNew(typeBetaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpendingNew(parameterBetaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTimeNew(spendingTimeNewSEXP);
    rcpp_result_gen = Rcpp::wrap(getCP_mams(INew, M, r, corr_known, L, zL, theta, IMax, kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityTheta, spendingTime, MullerSchafer, MNew, selected, rNew, kNew, informationRatesNew, efficacyStoppingNew, futilityStoppingNew, typeAlphaSpendingNew, parameterAlphaSpendingNew, futilityBoundsInt, futilityCPInt, futilityThetaInt, typeBetaSpendingNew, parameterBetaSpendingNew, spendingTimeNew));
    return rcpp_result_gen;
END_RCPP
}
// getCP_seamless
Rcpp::NumericVector getCP_seamless(const double INew, const int M, const double r, const bool corr_known, const int L, const double zL, const double theta, const double IMax, const int K, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityTheta, const Rcpp::NumericVector& spendingTime, const bool MullerSchafer, const int kNew, const Rcpp::NumericVector& informationRatesNew, const Rcpp::LogicalVector& efficacyStoppingNew, const Rcpp::LogicalVector& futilityStoppingNew, const std::string& typeAlphaSpendingNew, const double parameterAlphaSpendingNew, const Rcpp::Nullable<Rcpp::NumericVector> futilityBoundsInt, const Rcpp::Nullable<Rcpp::NumericVector> futilityCPInt, const Rcpp::Nullable<Rcpp::NumericVector> futilityThetaInt, const std::string& typeBetaSpendingNew, const double parameterBetaSpendingNew, const Rcpp::NumericVector& spendingTimeNew);
RcppExport SEXP _lrstat_getCP_seamless(SEXP INewSEXP, SEXP MSEXP, SEXP rSEXP, SEXP corr_knownSEXP, SEXP LSEXP, SEXP zLSEXP, SEXP thetaSEXP, SEXP IMaxSEXP, SEXP KSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityThetaSEXP, SEXP spendingTimeSEXP, SEXP MullerSchaferSEXP, SEXP kNewSEXP, SEXP informationRatesNewSEXP, SEXP efficacyStoppingNewSEXP, SEXP futilityStoppingNewSEXP, SEXP typeAlphaSpendingNewSEXP, SEXP parameterAlphaSpendingNewSEXP, SEXP futilityBoundsIntSEXP, SEXP futilityCPIntSEXP, SEXP futilityThetaIntSEXP, SEXP typeBetaSpendingNewSEXP, SEXP parameterBetaSpendingNewSEXP, SEXP spendingTimeNewSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type INew(INewSEXP);
    Rcpp::traits::input_parameter< const int >::type M(MSEXP);
    Rcpp::traits::input_parameter< const double >::type r(rSEXP);
    Rcpp::traits::input_parameter< const bool >::type corr_known(corr_knownSEXP);
    Rcpp::traits::input_parameter< const int >::type L(LSEXP);
    Rcpp::traits::input_parameter< const double >::type zL(zLSEXP);
    Rcpp::traits::input_parameter< const double >::type theta(thetaSEXP);
    Rcpp::traits::input_parameter< const double >::type IMax(IMaxSEXP);
    Rcpp::traits::input_parameter< const int >::type K(KSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityTheta(futilityThetaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type MullerSchafer(MullerSchaferSEXP);
    Rcpp::traits::input_parameter< const int >::type kNew(kNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRatesNew(informationRatesNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStoppingNew(efficacyStoppingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStoppingNew(futilityStoppingNewSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpendingNew(typeAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpendingNew(parameterAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBoundsInt(futilityBoundsIntSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCPInt(futilityCPIntSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityThetaInt(futilityThetaIntSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpendingNew(typeBetaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpendingNew(parameterBetaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTimeNew(spendingTimeNewSEXP);
    rcpp_result_gen = Rcpp::wrap(getCP_seamless(INew, M, r, corr_known, L, zL, theta, IMax, K, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityTheta, spendingTime, MullerSchafer, kNew, informationRatesNew, efficacyStoppingNew, futilityStoppingNew, typeAlphaSpendingNew, parameterAlphaSpendingNew, futilityBoundsInt, futilityCPInt, futilityThetaInt, typeBetaSpendingNew, parameterBetaSpendingNew, spendingTimeNew));
    return rcpp_result_gen;
END_RCPP
}
// getCI
Rcpp::DataFrame getCI(const int L, const double zL, const double IMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::NumericVector& criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& spendingTime);
RcppExport SEXP _lrstat_getCI(SEXP LSEXP, SEXP zLSEXP, SEXP IMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP spendingTimeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type L(LSEXP);
    Rcpp::traits::input_parameter< const double >::type zL(zLSEXP);
    Rcpp::traits::input_parameter< const double >::type IMax(IMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    rcpp_result_gen = Rcpp::wrap(getCI(L, zL, IMax, informationRates, efficacyStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, spendingTime));
    return rcpp_result_gen;
END_RCPP
}
// getRCI
Rcpp::DataFrame getRCI(const int L, const double zL, const double IMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::NumericVector& criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& spendingTime);
RcppExport SEXP _lrstat_getRCI(SEXP LSEXP, SEXP zLSEXP, SEXP IMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP spendingTimeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type L(LSEXP);
    Rcpp::traits::input_parameter< const double >::type zL(zLSEXP);
    Rcpp::traits::input_parameter< const double >::type IMax(IMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    rcpp_result_gen = Rcpp::wrap(getRCI(L, zL, IMax, informationRates, efficacyStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, spendingTime));
    return rcpp_result_gen;
END_RCPP
}
// getADCI
Rcpp::DataFrame getADCI(const int L, const double zL, const double IMax, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::NumericVector& criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& spendingTime, const bool MullerSchafer, const int Lc, const double zLc, const double INew, const Rcpp::NumericVector& informationRatesNew, const Rcpp::LogicalVector& efficacyStoppingNew, const std::string& typeAlphaSpendingNew, const double parameterAlphaSpendingNew, const Rcpp::NumericVector& spendingTimeNew);
RcppExport SEXP _lrstat_getADCI(SEXP LSEXP, SEXP zLSEXP, SEXP IMaxSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP spendingTimeSEXP, SEXP MullerSchaferSEXP, SEXP LcSEXP, SEXP zLcSEXP, SEXP INewSEXP, SEXP informationRatesNewSEXP, SEXP efficacyStoppingNewSEXP, SEXP typeAlphaSpendingNewSEXP, SEXP parameterAlphaSpendingNewSEXP, SEXP spendingTimeNewSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type L(LSEXP);
    Rcpp::traits::input_parameter< const double >::type zL(zLSEXP);
    Rcpp::traits::input_parameter< const double >::type IMax(IMaxSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type MullerSchafer(MullerSchaferSEXP);
    Rcpp::traits::input_parameter< const int >::type Lc(LcSEXP);
    Rcpp::traits::input_parameter< const double >::type zLc(zLcSEXP);
    Rcpp::traits::input_parameter< const double >::type INew(INewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRatesNew(informationRatesNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStoppingNew(efficacyStoppingNewSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpendingNew(typeAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpendingNew(parameterAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTimeNew(spendingTimeNewSEXP);
    rcpp_result_gen = Rcpp::wrap(getADCI(L, zL, IMax, kMax, informationRates, efficacyStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, spendingTime, MullerSchafer, Lc, zLc, INew, informationRatesNew, efficacyStoppingNew, typeAlphaSpendingNew, parameterAlphaSpendingNew, spendingTimeNew));
    return rcpp_result_gen;
END_RCPP
}
// getADRCI
Rcpp::DataFrame getADRCI(const int L, const double zL, const double IMax, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::NumericVector& criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& spendingTime, const bool MullerSchafer, const int Lc, const double zLc, const double INew, const Rcpp::NumericVector& informationRatesNew, const Rcpp::LogicalVector& efficacyStoppingNew, const std::string& typeAlphaSpendingNew, const double parameterAlphaSpendingNew, const Rcpp::NumericVector& spendingTimeNew);
RcppExport SEXP _lrstat_getADRCI(SEXP LSEXP, SEXP zLSEXP, SEXP IMaxSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP spendingTimeSEXP, SEXP MullerSchaferSEXP, SEXP LcSEXP, SEXP zLcSEXP, SEXP INewSEXP, SEXP informationRatesNewSEXP, SEXP efficacyStoppingNewSEXP, SEXP typeAlphaSpendingNewSEXP, SEXP parameterAlphaSpendingNewSEXP, SEXP spendingTimeNewSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type L(LSEXP);
    Rcpp::traits::input_parameter< const double >::type zL(zLSEXP);
    Rcpp::traits::input_parameter< const double >::type IMax(IMaxSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type MullerSchafer(MullerSchaferSEXP);
    Rcpp::traits::input_parameter< const int >::type Lc(LcSEXP);
    Rcpp::traits::input_parameter< const double >::type zLc(zLcSEXP);
    Rcpp::traits::input_parameter< const double >::type INew(INewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRatesNew(informationRatesNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStoppingNew(efficacyStoppingNewSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpendingNew(typeAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpendingNew(parameterAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTimeNew(spendingTimeNewSEXP);
    rcpp_result_gen = Rcpp::wrap(getADRCI(L, zL, IMax, kMax, informationRates, efficacyStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, spendingTime, MullerSchafer, Lc, zLc, INew, informationRatesNew, efficacyStoppingNew, typeAlphaSpendingNew, parameterAlphaSpendingNew, spendingTimeNew));
    return rcpp_result_gen;
END_RCPP
}
// getCI_mams
Rcpp::DataFrame getCI_mams(const int M, const double r, const bool corr_known, const int L, const Rcpp::NumericVector& zL, const double IMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::Nullable<Rcpp::NumericMatrix> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& spendingTime);
RcppExport SEXP _lrstat_getCI_mams(SEXP MSEXP, SEXP rSEXP, SEXP corr_knownSEXP, SEXP LSEXP, SEXP zLSEXP, SEXP IMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP spendingTimeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type M(MSEXP);
    Rcpp::traits::input_parameter< const double >::type r(rSEXP);
    Rcpp::traits::input_parameter< const bool >::type corr_known(corr_knownSEXP);
    Rcpp::traits::input_parameter< const int >::type L(LSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type zL(zLSEXP);
    Rcpp::traits::input_parameter< const double >::type IMax(IMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericMatrix> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    rcpp_result_gen = Rcpp::wrap(getCI_mams(M, r, corr_known, L, zL, IMax, informationRates, efficacyStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, spendingTime));
    return rcpp_result_gen;
END_RCPP
}
// getADCI_mams
Rcpp::DataFrame getADCI_mams(const int M, const double r, const bool corr_known, const int L, const Rcpp::NumericVector& zL, const double IMax, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::Nullable<Rcpp::NumericMatrix> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& spendingTime, const bool MullerSchafer, const int MNew, const Rcpp::IntegerVector& selected, const double rNew, const int Lc, const Rcpp::NumericVector& zLc, const double INew, const Rcpp::NumericVector& informationRatesNew, const Rcpp::LogicalVector& efficacyStoppingNew, const std::string& typeAlphaSpendingNew, const double parameterAlphaSpendingNew, const Rcpp::NumericVector& spendingTimeNew);
RcppExport SEXP _lrstat_getADCI_mams(SEXP MSEXP, SEXP rSEXP, SEXP corr_knownSEXP, SEXP LSEXP, SEXP zLSEXP, SEXP IMaxSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP spendingTimeSEXP, SEXP MullerSchaferSEXP, SEXP MNewSEXP, SEXP selectedSEXP, SEXP rNewSEXP, SEXP LcSEXP, SEXP zLcSEXP, SEXP INewSEXP, SEXP informationRatesNewSEXP, SEXP efficacyStoppingNewSEXP, SEXP typeAlphaSpendingNewSEXP, SEXP parameterAlphaSpendingNewSEXP, SEXP spendingTimeNewSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type M(MSEXP);
    Rcpp::traits::input_parameter< const double >::type r(rSEXP);
    Rcpp::traits::input_parameter< const bool >::type corr_known(corr_knownSEXP);
    Rcpp::traits::input_parameter< const int >::type L(LSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type zL(zLSEXP);
    Rcpp::traits::input_parameter< const double >::type IMax(IMaxSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericMatrix> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type MullerSchafer(MullerSchaferSEXP);
    Rcpp::traits::input_parameter< const int >::type MNew(MNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type selected(selectedSEXP);
    Rcpp::traits::input_parameter< const double >::type rNew(rNewSEXP);
    Rcpp::traits::input_parameter< const int >::type Lc(LcSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type zLc(zLcSEXP);
    Rcpp::traits::input_parameter< const double >::type INew(INewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRatesNew(informationRatesNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStoppingNew(efficacyStoppingNewSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpendingNew(typeAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpendingNew(parameterAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTimeNew(spendingTimeNewSEXP);
    rcpp_result_gen = Rcpp::wrap(getADCI_mams(M, r, corr_known, L, zL, IMax, kMax, informationRates, efficacyStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, spendingTime, MullerSchafer, MNew, selected, rNew, Lc, zLc, INew, informationRatesNew, efficacyStoppingNew, typeAlphaSpendingNew, parameterAlphaSpendingNew, spendingTimeNew));
    return rcpp_result_gen;
END_RCPP
}
// getCI_seamless
Rcpp::DataFrame getCI_seamless(const int M, const double r, const bool corr_known, const int L, const double zL, const double IMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::NumericVector& criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& spendingTime);
RcppExport SEXP _lrstat_getCI_seamless(SEXP MSEXP, SEXP rSEXP, SEXP corr_knownSEXP, SEXP LSEXP, SEXP zLSEXP, SEXP IMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP spendingTimeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type M(MSEXP);
    Rcpp::traits::input_parameter< const double >::type r(rSEXP);
    Rcpp::traits::input_parameter< const bool >::type corr_known(corr_knownSEXP);
    Rcpp::traits::input_parameter< const int >::type L(LSEXP);
    Rcpp::traits::input_parameter< const double >::type zL(zLSEXP);
    Rcpp::traits::input_parameter< const double >::type IMax(IMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    rcpp_result_gen = Rcpp::wrap(getCI_seamless(M, r, corr_known, L, zL, IMax, informationRates, efficacyStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, spendingTime));
    return rcpp_result_gen;
END_RCPP
}
// getADCI_seamless
Rcpp::DataFrame getADCI_seamless(const int M, const double r, const bool corr_known, const int L, const double zL, const double IMax, const int K, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::NumericVector& criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& spendingTime, const bool MullerSchafer, const int Lc, const double zLc, const double INew, const Rcpp::NumericVector& informationRatesNew, const Rcpp::LogicalVector& efficacyStoppingNew, const std::string& typeAlphaSpendingNew, const double parameterAlphaSpendingNew, const Rcpp::NumericVector& spendingTimeNew);
RcppExport SEXP _lrstat_getADCI_seamless(SEXP MSEXP, SEXP rSEXP, SEXP corr_knownSEXP, SEXP LSEXP, SEXP zLSEXP, SEXP IMaxSEXP, SEXP KSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP spendingTimeSEXP, SEXP MullerSchaferSEXP, SEXP LcSEXP, SEXP zLcSEXP, SEXP INewSEXP, SEXP informationRatesNewSEXP, SEXP efficacyStoppingNewSEXP, SEXP typeAlphaSpendingNewSEXP, SEXP parameterAlphaSpendingNewSEXP, SEXP spendingTimeNewSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type M(MSEXP);
    Rcpp::traits::input_parameter< const double >::type r(rSEXP);
    Rcpp::traits::input_parameter< const bool >::type corr_known(corr_knownSEXP);
    Rcpp::traits::input_parameter< const int >::type L(LSEXP);
    Rcpp::traits::input_parameter< const double >::type zL(zLSEXP);
    Rcpp::traits::input_parameter< const double >::type IMax(IMaxSEXP);
    Rcpp::traits::input_parameter< const int >::type K(KSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type MullerSchafer(MullerSchaferSEXP);
    Rcpp::traits::input_parameter< const int >::type Lc(LcSEXP);
    Rcpp::traits::input_parameter< const double >::type zLc(zLcSEXP);
    Rcpp::traits::input_parameter< const double >::type INew(INewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRatesNew(informationRatesNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStoppingNew(efficacyStoppingNewSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpendingNew(typeAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpendingNew(parameterAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTimeNew(spendingTimeNewSEXP);
    rcpp_result_gen = Rcpp::wrap(getADCI_seamless(M, r, corr_known, L, zL, IMax, K, informationRates, efficacyStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, spendingTime, MullerSchafer, Lc, zLc, INew, informationRatesNew, efficacyStoppingNew, typeAlphaSpendingNew, parameterAlphaSpendingNew, spendingTimeNew));
    return rcpp_result_gen;
END_RCPP
}
// accrual
std::vector<double> accrual(const std::vector<double>& time, const std::vector<double>& accrualTime, const std::vector<double>& accrualIntensity, const double accrualDuration);
RcppExport SEXP _lrstat_accrual(SEXP timeSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP accrualDurationSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    rcpp_result_gen = Rcpp::wrap(accrual(time, accrualTime, accrualIntensity, accrualDuration));
    return rcpp_result_gen;
END_RCPP
}
// getAccrualDurationFromN
std::vector<double> getAccrualDurationFromN(const std::vector<double>& nsubjects, const std::vector<double>& accrualTime, const std::vector<double>& accrualIntensity);
RcppExport SEXP _lrstat_getAccrualDurationFromN(SEXP nsubjectsSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type nsubjects(nsubjectsSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type accrualIntensity(accrualIntensitySEXP);
    rcpp_result_gen = Rcpp::wrap(getAccrualDurationFromN(nsubjects, accrualTime, accrualIntensity));
    return rcpp_result_gen;
END_RCPP
}
// patrisk
std::vector<double> patrisk(const std::vector<double>& time, const std::vector<double>& piecewiseSurvivalTime, const std::vector<double>& lambda, const std::vector<double>& gamma);
RcppExport SEXP _lrstat_patrisk(SEXP timeSEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP lambdaSEXP, SEXP gammaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type gamma(gammaSEXP);
    rcpp_result_gen = Rcpp::wrap(patrisk(time, piecewiseSurvivalTime, lambda, gamma));
    return rcpp_result_gen;
END_RCPP
}
// pevent
std::vector<double> pevent(const std::vector<double>& time, const std::vector<double>& piecewiseSurvivalTime, const std::vector<double>& lambda, const std::vector<double>& gamma);
RcppExport SEXP _lrstat_pevent(SEXP timeSEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP lambdaSEXP, SEXP gammaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type gamma(gammaSEXP);
    rcpp_result_gen = Rcpp::wrap(pevent(time, piecewiseSurvivalTime, lambda, gamma));
    return rcpp_result_gen;
END_RCPP
}
// natrisk
Rcpp::NumericMatrix natrisk(const Rcpp::NumericVector& t, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const double accrualDuration, const double maxFollowupTime, const double time);
RcppExport SEXP _lrstat_natrisk(SEXP tSEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP maxFollowupTimeSEXP, SEXP timeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type t(tSEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< const double >::type maxFollowupTime(maxFollowupTimeSEXP);
    Rcpp::traits::input_parameter< const double >::type time(timeSEXP);
    rcpp_result_gen = Rcpp::wrap(natrisk(t, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, lambda1, lambda2, gamma1, gamma2, accrualDuration, maxFollowupTime, time));
    return rcpp_result_gen;
END_RCPP
}
// nevent
Rcpp::NumericMatrix nevent(const Rcpp::NumericVector& time, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const double accrualDuration, const double maxFollowupTime);
RcppExport SEXP _lrstat_nevent(SEXP timeSEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP maxFollowupTimeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< const double >::type maxFollowupTime(maxFollowupTimeSEXP);
    rcpp_result_gen = Rcpp::wrap(nevent(time, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, lambda1, lambda2, gamma1, gamma2, accrualDuration, maxFollowupTime));
    return rcpp_result_gen;
END_RCPP
}
// powerOnePropExact
Rcpp::DataFrame powerOnePropExact(const int n, const double piH0, const double pi, const double alpha);
RcppExport SEXP _lrstat_powerOnePropExact(SEXP nSEXP, SEXP piH0SEXP, SEXP piSEXP, SEXP alphaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type n(nSEXP);
    Rcpp::traits::input_parameter< const double >::type piH0(piH0SEXP);
    Rcpp::traits::input_parameter< const double >::type pi(piSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    rcpp_result_gen = Rcpp::wrap(powerOnePropExact(n, piH0, pi, alpha));
    return rcpp_result_gen;
END_RCPP
}
// samplesizeOnePropExact
Rcpp::DataFrame samplesizeOnePropExact(const double beta, const double piH0, const double pi, const double alpha, const int max_n_search, const int window);
RcppExport SEXP _lrstat_samplesizeOnePropExact(SEXP betaSEXP, SEXP piH0SEXP, SEXP piSEXP, SEXP alphaSEXP, SEXP max_n_searchSEXP, SEXP windowSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const double >::type piH0(piH0SEXP);
    Rcpp::traits::input_parameter< const double >::type pi(piSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const int >::type max_n_search(max_n_searchSEXP);
    Rcpp::traits::input_parameter< const int >::type window(windowSEXP);
    rcpp_result_gen = Rcpp::wrap(samplesizeOnePropExact(beta, piH0, pi, alpha, max_n_search, window));
    return rcpp_result_gen;
END_RCPP
}
// powerOneRateExact
Rcpp::DataFrame powerOneRateExact(const int n, const double lambdaH0, const double lambda, const double D, const double alpha);
RcppExport SEXP _lrstat_powerOneRateExact(SEXP nSEXP, SEXP lambdaH0SEXP, SEXP lambdaSEXP, SEXP DSEXP, SEXP alphaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type n(nSEXP);
    Rcpp::traits::input_parameter< const double >::type lambdaH0(lambdaH0SEXP);
    Rcpp::traits::input_parameter< const double >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< const double >::type D(DSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    rcpp_result_gen = Rcpp::wrap(powerOneRateExact(n, lambdaH0, lambda, D, alpha));
    return rcpp_result_gen;
END_RCPP
}
// samplesizeOneRateExact
Rcpp::DataFrame samplesizeOneRateExact(const double beta, const double lambdaH0, const double lambda, const double D, const double alpha, const int max_n_search, const int window);
RcppExport SEXP _lrstat_samplesizeOneRateExact(SEXP betaSEXP, SEXP lambdaH0SEXP, SEXP lambdaSEXP, SEXP DSEXP, SEXP alphaSEXP, SEXP max_n_searchSEXP, SEXP windowSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const double >::type lambdaH0(lambdaH0SEXP);
    Rcpp::traits::input_parameter< const double >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< const double >::type D(DSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const int >::type max_n_search(max_n_searchSEXP);
    Rcpp::traits::input_parameter< const int >::type window(windowSEXP);
    rcpp_result_gen = Rcpp::wrap(samplesizeOneRateExact(beta, lambdaH0, lambda, D, alpha, max_n_search, window));
    return rcpp_result_gen;
END_RCPP
}
// powerFisherExact
Rcpp::DataFrame powerFisherExact(const int n, const double pi1, const double pi2, const double allocationRatioPlanned, const double alpha);
RcppExport SEXP _lrstat_powerFisherExact(SEXP nSEXP, SEXP pi1SEXP, SEXP pi2SEXP, SEXP allocationRatioPlannedSEXP, SEXP alphaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type n(nSEXP);
    Rcpp::traits::input_parameter< const double >::type pi1(pi1SEXP);
    Rcpp::traits::input_parameter< const double >::type pi2(pi2SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    rcpp_result_gen = Rcpp::wrap(powerFisherExact(n, pi1, pi2, allocationRatioPlanned, alpha));
    return rcpp_result_gen;
END_RCPP
}
// samplesizeFisherExact
Rcpp::DataFrame samplesizeFisherExact(const double beta, const double pi1, const double pi2, const double allocationRatioPlanned, const double alpha, const int max_n_search, const int window);
RcppExport SEXP _lrstat_samplesizeFisherExact(SEXP betaSEXP, SEXP pi1SEXP, SEXP pi2SEXP, SEXP allocationRatioPlannedSEXP, SEXP alphaSEXP, SEXP max_n_searchSEXP, SEXP windowSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const double >::type pi1(pi1SEXP);
    Rcpp::traits::input_parameter< const double >::type pi2(pi2SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const int >::type max_n_search(max_n_searchSEXP);
    Rcpp::traits::input_parameter< const int >::type window(windowSEXP);
    rcpp_result_gen = Rcpp::wrap(samplesizeFisherExact(beta, pi1, pi2, allocationRatioPlanned, alpha, max_n_search, window));
    return rcpp_result_gen;
END_RCPP
}
// powerRiskDiffExact
Rcpp::DataFrame powerRiskDiffExact(const int n, const double riskDiffH0, const double pi1, const double pi2, const double allocationRatioPlanned, const double alpha, const bool calculateAttainedAlpha);
RcppExport SEXP _lrstat_powerRiskDiffExact(SEXP nSEXP, SEXP riskDiffH0SEXP, SEXP pi1SEXP, SEXP pi2SEXP, SEXP allocationRatioPlannedSEXP, SEXP alphaSEXP, SEXP calculateAttainedAlphaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type n(nSEXP);
    Rcpp::traits::input_parameter< const double >::type riskDiffH0(riskDiffH0SEXP);
    Rcpp::traits::input_parameter< const double >::type pi1(pi1SEXP);
    Rcpp::traits::input_parameter< const double >::type pi2(pi2SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const bool >::type calculateAttainedAlpha(calculateAttainedAlphaSEXP);
    rcpp_result_gen = Rcpp::wrap(powerRiskDiffExact(n, riskDiffH0, pi1, pi2, allocationRatioPlanned, alpha, calculateAttainedAlpha));
    return rcpp_result_gen;
END_RCPP
}
// samplesizeRiskDiffExact
Rcpp::DataFrame samplesizeRiskDiffExact(const double beta, const double riskDiffH0, const double pi1, const double pi2, const double allocationRatioPlanned, const double alpha, const bool calculateAttainedAlpha, const int max_n_search, const int window);
RcppExport SEXP _lrstat_samplesizeRiskDiffExact(SEXP betaSEXP, SEXP riskDiffH0SEXP, SEXP pi1SEXP, SEXP pi2SEXP, SEXP allocationRatioPlannedSEXP, SEXP alphaSEXP, SEXP calculateAttainedAlphaSEXP, SEXP max_n_searchSEXP, SEXP windowSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const double >::type riskDiffH0(riskDiffH0SEXP);
    Rcpp::traits::input_parameter< const double >::type pi1(pi1SEXP);
    Rcpp::traits::input_parameter< const double >::type pi2(pi2SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const bool >::type calculateAttainedAlpha(calculateAttainedAlphaSEXP);
    Rcpp::traits::input_parameter< const int >::type max_n_search(max_n_searchSEXP);
    Rcpp::traits::input_parameter< const int >::type window(windowSEXP);
    rcpp_result_gen = Rcpp::wrap(samplesizeRiskDiffExact(beta, riskDiffH0, pi1, pi2, allocationRatioPlanned, alpha, calculateAttainedAlpha, max_n_search, window));
    return rcpp_result_gen;
END_RCPP
}
// powerRiskRatioExact
Rcpp::DataFrame powerRiskRatioExact(const int n, const double riskRatioH0, const double pi1, const double pi2, const double allocationRatioPlanned, const double alpha, const bool calculateAttainedAlpha);
RcppExport SEXP _lrstat_powerRiskRatioExact(SEXP nSEXP, SEXP riskRatioH0SEXP, SEXP pi1SEXP, SEXP pi2SEXP, SEXP allocationRatioPlannedSEXP, SEXP alphaSEXP, SEXP calculateAttainedAlphaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type n(nSEXP);
    Rcpp::traits::input_parameter< const double >::type riskRatioH0(riskRatioH0SEXP);
    Rcpp::traits::input_parameter< const double >::type pi1(pi1SEXP);
    Rcpp::traits::input_parameter< const double >::type pi2(pi2SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const bool >::type calculateAttainedAlpha(calculateAttainedAlphaSEXP);
    rcpp_result_gen = Rcpp::wrap(powerRiskRatioExact(n, riskRatioH0, pi1, pi2, allocationRatioPlanned, alpha, calculateAttainedAlpha));
    return rcpp_result_gen;
END_RCPP
}
// samplesizeRiskRatioExact
Rcpp::DataFrame samplesizeRiskRatioExact(const double beta, const double riskRatioH0, const double pi1, const double pi2, const double allocationRatioPlanned, const double alpha, const bool calculateAttainedAlpha, const int max_n_search, const int window);
RcppExport SEXP _lrstat_samplesizeRiskRatioExact(SEXP betaSEXP, SEXP riskRatioH0SEXP, SEXP pi1SEXP, SEXP pi2SEXP, SEXP allocationRatioPlannedSEXP, SEXP alphaSEXP, SEXP calculateAttainedAlphaSEXP, SEXP max_n_searchSEXP, SEXP windowSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const double >::type riskRatioH0(riskRatioH0SEXP);
    Rcpp::traits::input_parameter< const double >::type pi1(pi1SEXP);
    Rcpp::traits::input_parameter< const double >::type pi2(pi2SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const bool >::type calculateAttainedAlpha(calculateAttainedAlphaSEXP);
    Rcpp::traits::input_parameter< const int >::type max_n_search(max_n_searchSEXP);
    Rcpp::traits::input_parameter< const int >::type window(windowSEXP);
    rcpp_result_gen = Rcpp::wrap(samplesizeRiskRatioExact(beta, riskRatioH0, pi1, pi2, allocationRatioPlanned, alpha, calculateAttainedAlpha, max_n_search, window));
    return rcpp_result_gen;
END_RCPP
}
// powerRiskDiffExactEquiv
Rcpp::DataFrame powerRiskDiffExactEquiv(const int n, const double riskDiffLower, const double riskDiffUpper, const double pi1, const double pi2, const double allocationRatioPlanned, const double alpha, const bool calculateAttainedAlpha);
RcppExport SEXP _lrstat_powerRiskDiffExactEquiv(SEXP nSEXP, SEXP riskDiffLowerSEXP, SEXP riskDiffUpperSEXP, SEXP pi1SEXP, SEXP pi2SEXP, SEXP allocationRatioPlannedSEXP, SEXP alphaSEXP, SEXP calculateAttainedAlphaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type n(nSEXP);
    Rcpp::traits::input_parameter< const double >::type riskDiffLower(riskDiffLowerSEXP);
    Rcpp::traits::input_parameter< const double >::type riskDiffUpper(riskDiffUpperSEXP);
    Rcpp::traits::input_parameter< const double >::type pi1(pi1SEXP);
    Rcpp::traits::input_parameter< const double >::type pi2(pi2SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const bool >::type calculateAttainedAlpha(calculateAttainedAlphaSEXP);
    rcpp_result_gen = Rcpp::wrap(powerRiskDiffExactEquiv(n, riskDiffLower, riskDiffUpper, pi1, pi2, allocationRatioPlanned, alpha, calculateAttainedAlpha));
    return rcpp_result_gen;
END_RCPP
}
// samplesizeRiskDiffExactEquiv
Rcpp::DataFrame samplesizeRiskDiffExactEquiv(const double beta, const double riskDiffLower, const double riskDiffUpper, const double pi1, const double pi2, const double allocationRatioPlanned, const double alpha, const bool calculateAttainedAlpha, const int max_n_search, const int window);
RcppExport SEXP _lrstat_samplesizeRiskDiffExactEquiv(SEXP betaSEXP, SEXP riskDiffLowerSEXP, SEXP riskDiffUpperSEXP, SEXP pi1SEXP, SEXP pi2SEXP, SEXP allocationRatioPlannedSEXP, SEXP alphaSEXP, SEXP calculateAttainedAlphaSEXP, SEXP max_n_searchSEXP, SEXP windowSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const double >::type riskDiffLower(riskDiffLowerSEXP);
    Rcpp::traits::input_parameter< const double >::type riskDiffUpper(riskDiffUpperSEXP);
    Rcpp::traits::input_parameter< const double >::type pi1(pi1SEXP);
    Rcpp::traits::input_parameter< const double >::type pi2(pi2SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const bool >::type calculateAttainedAlpha(calculateAttainedAlphaSEXP);
    Rcpp::traits::input_parameter< const int >::type max_n_search(max_n_searchSEXP);
    Rcpp::traits::input_parameter< const int >::type window(windowSEXP);
    rcpp_result_gen = Rcpp::wrap(samplesizeRiskDiffExactEquiv(beta, riskDiffLower, riskDiffUpper, pi1, pi2, allocationRatioPlanned, alpha, calculateAttainedAlpha, max_n_search, window));
    return rcpp_result_gen;
END_RCPP
}
// powerRiskRatioExactEquiv
Rcpp::DataFrame powerRiskRatioExactEquiv(const int n, const double riskRatioLower, const double riskRatioUpper, const double pi1, const double pi2, const double allocationRatioPlanned, const double alpha, const bool calculateAttainedAlpha);
RcppExport SEXP _lrstat_powerRiskRatioExactEquiv(SEXP nSEXP, SEXP riskRatioLowerSEXP, SEXP riskRatioUpperSEXP, SEXP pi1SEXP, SEXP pi2SEXP, SEXP allocationRatioPlannedSEXP, SEXP alphaSEXP, SEXP calculateAttainedAlphaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type n(nSEXP);
    Rcpp::traits::input_parameter< const double >::type riskRatioLower(riskRatioLowerSEXP);
    Rcpp::traits::input_parameter< const double >::type riskRatioUpper(riskRatioUpperSEXP);
    Rcpp::traits::input_parameter< const double >::type pi1(pi1SEXP);
    Rcpp::traits::input_parameter< const double >::type pi2(pi2SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const bool >::type calculateAttainedAlpha(calculateAttainedAlphaSEXP);
    rcpp_result_gen = Rcpp::wrap(powerRiskRatioExactEquiv(n, riskRatioLower, riskRatioUpper, pi1, pi2, allocationRatioPlanned, alpha, calculateAttainedAlpha));
    return rcpp_result_gen;
END_RCPP
}
// samplesizeRiskRatioExactEquiv
Rcpp::DataFrame samplesizeRiskRatioExactEquiv(const double beta, const double riskRatioLower, const double riskRatioUpper, const double pi1, const double pi2, const double allocationRatioPlanned, const double alpha, const bool calculateAttainedAlpha, const int max_n_search, const int window);
RcppExport SEXP _lrstat_samplesizeRiskRatioExactEquiv(SEXP betaSEXP, SEXP riskRatioLowerSEXP, SEXP riskRatioUpperSEXP, SEXP pi1SEXP, SEXP pi2SEXP, SEXP allocationRatioPlannedSEXP, SEXP alphaSEXP, SEXP calculateAttainedAlphaSEXP, SEXP max_n_searchSEXP, SEXP windowSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const double >::type riskRatioLower(riskRatioLowerSEXP);
    Rcpp::traits::input_parameter< const double >::type riskRatioUpper(riskRatioUpperSEXP);
    Rcpp::traits::input_parameter< const double >::type pi1(pi1SEXP);
    Rcpp::traits::input_parameter< const double >::type pi2(pi2SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const bool >::type calculateAttainedAlpha(calculateAttainedAlphaSEXP);
    Rcpp::traits::input_parameter< const int >::type max_n_search(max_n_searchSEXP);
    Rcpp::traits::input_parameter< const int >::type window(windowSEXP);
    rcpp_result_gen = Rcpp::wrap(samplesizeRiskRatioExactEquiv(beta, riskRatioLower, riskRatioUpper, pi1, pi2, allocationRatioPlanned, alpha, calculateAttainedAlpha, max_n_search, window));
    return rcpp_result_gen;
END_RCPP
}
// riskDiffExactPValue
Rcpp::DataFrame riskDiffExactPValue(const int n1, const int y1, const int n2, const int y2, const double riskDiffH0, bool directionUpper);
RcppExport SEXP _lrstat_riskDiffExactPValue(SEXP n1SEXP, SEXP y1SEXP, SEXP n2SEXP, SEXP y2SEXP, SEXP riskDiffH0SEXP, SEXP directionUpperSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type n1(n1SEXP);
    Rcpp::traits::input_parameter< const int >::type y1(y1SEXP);
    Rcpp::traits::input_parameter< const int >::type n2(n2SEXP);
    Rcpp::traits::input_parameter< const int >::type y2(y2SEXP);
    Rcpp::traits::input_parameter< const double >::type riskDiffH0(riskDiffH0SEXP);
    Rcpp::traits::input_parameter< bool >::type directionUpper(directionUpperSEXP);
    rcpp_result_gen = Rcpp::wrap(riskDiffExactPValue(n1, y1, n2, y2, riskDiffH0, directionUpper));
    return rcpp_result_gen;
END_RCPP
}
// riskDiffExactCI
Rcpp::DataFrame riskDiffExactCI(const int n1, const int y1, const int n2, const int y2, const double cilevel);
RcppExport SEXP _lrstat_riskDiffExactCI(SEXP n1SEXP, SEXP y1SEXP, SEXP n2SEXP, SEXP y2SEXP, SEXP cilevelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type n1(n1SEXP);
    Rcpp::traits::input_parameter< const int >::type y1(y1SEXP);
    Rcpp::traits::input_parameter< const int >::type n2(n2SEXP);
    Rcpp::traits::input_parameter< const int >::type y2(y2SEXP);
    Rcpp::traits::input_parameter< const double >::type cilevel(cilevelSEXP);
    rcpp_result_gen = Rcpp::wrap(riskDiffExactCI(n1, y1, n2, y2, cilevel));
    return rcpp_result_gen;
END_RCPP
}
// riskRatioExactPValue
Rcpp::DataFrame riskRatioExactPValue(const int n1, const int y1, const int n2, const int y2, const double riskRatioH0, bool directionUpper);
RcppExport SEXP _lrstat_riskRatioExactPValue(SEXP n1SEXP, SEXP y1SEXP, SEXP n2SEXP, SEXP y2SEXP, SEXP riskRatioH0SEXP, SEXP directionUpperSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type n1(n1SEXP);
    Rcpp::traits::input_parameter< const int >::type y1(y1SEXP);
    Rcpp::traits::input_parameter< const int >::type n2(n2SEXP);
    Rcpp::traits::input_parameter< const int >::type y2(y2SEXP);
    Rcpp::traits::input_parameter< const double >::type riskRatioH0(riskRatioH0SEXP);
    Rcpp::traits::input_parameter< bool >::type directionUpper(directionUpperSEXP);
    rcpp_result_gen = Rcpp::wrap(riskRatioExactPValue(n1, y1, n2, y2, riskRatioH0, directionUpper));
    return rcpp_result_gen;
END_RCPP
}
// riskRatioExactCI
Rcpp::DataFrame riskRatioExactCI(const int n1, const int y1, const int n2, const int y2, const double cilevel);
RcppExport SEXP _lrstat_riskRatioExactCI(SEXP n1SEXP, SEXP y1SEXP, SEXP n2SEXP, SEXP y2SEXP, SEXP cilevelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type n1(n1SEXP);
    Rcpp::traits::input_parameter< const int >::type y1(y1SEXP);
    Rcpp::traits::input_parameter< const int >::type n2(n2SEXP);
    Rcpp::traits::input_parameter< const int >::type y2(y2SEXP);
    Rcpp::traits::input_parameter< const double >::type cilevel(cilevelSEXP);
    rcpp_result_gen = Rcpp::wrap(riskRatioExactCI(n1, y1, n2, y2, cilevel));
    return rcpp_result_gen;
END_RCPP
}
// errorSpent
std::vector<double> errorSpent(const std::vector<double>& t, const double error, const std::string& sf, const double sfpar);
RcppExport SEXP _lrstat_errorSpent(SEXP tSEXP, SEXP errorSEXP, SEXP sfSEXP, SEXP sfparSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type t(tSEXP);
    Rcpp::traits::input_parameter< const double >::type error(errorSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type sf(sfSEXP);
    Rcpp::traits::input_parameter< const double >::type sfpar(sfparSEXP);
    rcpp_result_gen = Rcpp::wrap(errorSpent(t, error, sf, sfpar));
    return rcpp_result_gen;
END_RCPP
}
// exitprob
Rcpp::List exitprob(const Rcpp::NumericVector& b, const Rcpp::NumericVector& a, const Rcpp::NumericVector& theta, const Rcpp::NumericVector& I);
RcppExport SEXP _lrstat_exitprob(SEXP bSEXP, SEXP aSEXP, SEXP thetaSEXP, SEXP ISEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type b(bSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type a(aSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type theta(thetaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type I(ISEXP);
    rcpp_result_gen = Rcpp::wrap(exitprob(b, a, theta, I));
    return rcpp_result_gen;
END_RCPP
}
// getBound
Rcpp::NumericVector getBound(const int k, const Rcpp::NumericVector& informationRates, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::NumericVector& spendingTime, const Rcpp::LogicalVector& efficacyStopping);
RcppExport SEXP _lrstat_getBound(SEXP kSEXP, SEXP informationRatesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP spendingTimeSEXP, SEXP efficacyStoppingSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type k(kSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    rcpp_result_gen = Rcpp::wrap(getBound(k, informationRates, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, spendingTime, efficacyStopping));
    return rcpp_result_gen;
END_RCPP
}
// getDesign
Rcpp::List getDesign(const double beta, const double IMax, const double theta, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityTheta, const std::string& typeBetaSpending, const double parameterBetaSpending, const Rcpp::NumericVector& userBetaSpending, const Rcpp::NumericVector& spendingTime, const double varianceRatio);
RcppExport SEXP _lrstat_getDesign(SEXP betaSEXP, SEXP IMaxSEXP, SEXP thetaSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityThetaSEXP, SEXP typeBetaSpendingSEXP, SEXP parameterBetaSpendingSEXP, SEXP userBetaSpendingSEXP, SEXP spendingTimeSEXP, SEXP varianceRatioSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const double >::type IMax(IMaxSEXP);
    Rcpp::traits::input_parameter< const double >::type theta(thetaSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityTheta(futilityThetaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpending(typeBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpending(parameterBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userBetaSpending(userBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const double >::type varianceRatio(varianceRatioSEXP);
    rcpp_result_gen = Rcpp::wrap(getDesign(beta, IMax, theta, kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityTheta, typeBetaSpending, parameterBetaSpending, userBetaSpending, spendingTime, varianceRatio));
    return rcpp_result_gen;
END_RCPP
}
// getDesignEquiv
Rcpp::List getDesignEquiv(const double beta, const double IMax, const double thetaLower, const double thetaUpper, const double theta, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::NumericVector& spendingTime);
RcppExport SEXP _lrstat_getDesignEquiv(SEXP betaSEXP, SEXP IMaxSEXP, SEXP thetaLowerSEXP, SEXP thetaUpperSEXP, SEXP thetaSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP spendingTimeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const double >::type IMax(IMaxSEXP);
    Rcpp::traits::input_parameter< const double >::type thetaLower(thetaLowerSEXP);
    Rcpp::traits::input_parameter< const double >::type thetaUpper(thetaUpperSEXP);
    Rcpp::traits::input_parameter< const double >::type theta(thetaSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    rcpp_result_gen = Rcpp::wrap(getDesignEquiv(beta, IMax, thetaLower, thetaUpper, theta, kMax, informationRates, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, spendingTime));
    return rcpp_result_gen;
END_RCPP
}
// adaptDesign
Rcpp::List adaptDesign(double betaNew, double INew, const int L, const double zL, const double theta, const double IMax, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityTheta, const Rcpp::NumericVector& spendingTime, const bool MullerSchafer, const int kNew, const Rcpp::NumericVector& informationRatesNew, const Rcpp::LogicalVector& efficacyStoppingNew, const Rcpp::LogicalVector& futilityStoppingNew, const std::string& typeAlphaSpendingNew, const double parameterAlphaSpendingNew, const Rcpp::Nullable<Rcpp::NumericVector> futilityBoundsInt, const Rcpp::Nullable<Rcpp::NumericVector> futilityCPInt, const Rcpp::Nullable<Rcpp::NumericVector> futilityThetaInt, const std::string& typeBetaSpendingNew, const double parameterBetaSpendingNew, const Rcpp::NumericVector& userBetaSpendingNew, const Rcpp::NumericVector& spendingTimeNew, const double varianceRatio);
RcppExport SEXP _lrstat_adaptDesign(SEXP betaNewSEXP, SEXP INewSEXP, SEXP LSEXP, SEXP zLSEXP, SEXP thetaSEXP, SEXP IMaxSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityThetaSEXP, SEXP spendingTimeSEXP, SEXP MullerSchaferSEXP, SEXP kNewSEXP, SEXP informationRatesNewSEXP, SEXP efficacyStoppingNewSEXP, SEXP futilityStoppingNewSEXP, SEXP typeAlphaSpendingNewSEXP, SEXP parameterAlphaSpendingNewSEXP, SEXP futilityBoundsIntSEXP, SEXP futilityCPIntSEXP, SEXP futilityThetaIntSEXP, SEXP typeBetaSpendingNewSEXP, SEXP parameterBetaSpendingNewSEXP, SEXP userBetaSpendingNewSEXP, SEXP spendingTimeNewSEXP, SEXP varianceRatioSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type betaNew(betaNewSEXP);
    Rcpp::traits::input_parameter< double >::type INew(INewSEXP);
    Rcpp::traits::input_parameter< const int >::type L(LSEXP);
    Rcpp::traits::input_parameter< const double >::type zL(zLSEXP);
    Rcpp::traits::input_parameter< const double >::type theta(thetaSEXP);
    Rcpp::traits::input_parameter< const double >::type IMax(IMaxSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityTheta(futilityThetaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type MullerSchafer(MullerSchaferSEXP);
    Rcpp::traits::input_parameter< const int >::type kNew(kNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRatesNew(informationRatesNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStoppingNew(efficacyStoppingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStoppingNew(futilityStoppingNewSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpendingNew(typeAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpendingNew(parameterAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBoundsInt(futilityBoundsIntSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCPInt(futilityCPIntSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityThetaInt(futilityThetaIntSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpendingNew(typeBetaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpendingNew(parameterBetaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userBetaSpendingNew(userBetaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTimeNew(spendingTimeNewSEXP);
    Rcpp::traits::input_parameter< const double >::type varianceRatio(varianceRatioSEXP);
    rcpp_result_gen = Rcpp::wrap(adaptDesign(betaNew, INew, L, zL, theta, IMax, kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityTheta, spendingTime, MullerSchafer, kNew, informationRatesNew, efficacyStoppingNew, futilityStoppingNew, typeAlphaSpendingNew, parameterAlphaSpendingNew, futilityBoundsInt, futilityCPInt, futilityThetaInt, typeBetaSpendingNew, parameterBetaSpendingNew, userBetaSpendingNew, spendingTimeNew, varianceRatio));
    return rcpp_result_gen;
END_RCPP
}
// kmstat
Rcpp::DataFrame kmstat(const Rcpp::NumericVector& time, const double milestone, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const double accrualDuration, const double followupTime, const bool fixedFollowup);
RcppExport SEXP _lrstat_kmstat(SEXP timeSEXP, SEXP milestoneSEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const double >::type milestone(milestoneSEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    rcpp_result_gen = Rcpp::wrap(kmstat(time, milestone, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup));
    return rcpp_result_gen;
END_RCPP
}
// kmpower
Rcpp::List kmpower(const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilitySurvDiff, const std::string& typeBetaSpending, const double parameterBetaSpending, const double milestone, const double survDiffH0, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const double accrualDuration, const double followupTime, const bool fixedFollowup, const Rcpp::NumericVector& spendingTime, const double studyDuration);
RcppExport SEXP _lrstat_kmpower(SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilitySurvDiffSEXP, SEXP typeBetaSpendingSEXP, SEXP parameterBetaSpendingSEXP, SEXP milestoneSEXP, SEXP survDiffH0SEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP spendingTimeSEXP, SEXP studyDurationSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilitySurvDiff(futilitySurvDiffSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpending(typeBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpending(parameterBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type milestone(milestoneSEXP);
    Rcpp::traits::input_parameter< const double >::type survDiffH0(survDiffH0SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const double >::type studyDuration(studyDurationSEXP);
    rcpp_result_gen = Rcpp::wrap(kmpower(kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilitySurvDiff, typeBetaSpending, parameterBetaSpending, milestone, survDiffH0, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup, spendingTime, studyDuration));
    return rcpp_result_gen;
END_RCPP
}
// kmsamplesize
Rcpp::List kmsamplesize(const double beta, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilitySurvDiff, const std::string& typeBetaSpending, const double parameterBetaSpending, const Rcpp::NumericVector& userBetaSpending, const double milestone, const double survDiffH0, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, double accrualDuration, double followupTime, const bool fixedFollowup, const Rcpp::NumericVector& spendingTime, const bool rounding);
RcppExport SEXP _lrstat_kmsamplesize(SEXP betaSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilitySurvDiffSEXP, SEXP typeBetaSpendingSEXP, SEXP parameterBetaSpendingSEXP, SEXP userBetaSpendingSEXP, SEXP milestoneSEXP, SEXP survDiffH0SEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP spendingTimeSEXP, SEXP roundingSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilitySurvDiff(futilitySurvDiffSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpending(typeBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpending(parameterBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userBetaSpending(userBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type milestone(milestoneSEXP);
    Rcpp::traits::input_parameter< const double >::type survDiffH0(survDiffH0SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type rounding(roundingSEXP);
    rcpp_result_gen = Rcpp::wrap(kmsamplesize(beta, kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilitySurvDiff, typeBetaSpending, parameterBetaSpending, userBetaSpending, milestone, survDiffH0, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup, spendingTime, rounding));
    return rcpp_result_gen;
END_RCPP
}
// kmpower1s
Rcpp::List kmpower1s(const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilitySurv, const std::string& typeBetaSpending, const double parameterBetaSpending, const double milestone, const double survH0, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda, const Rcpp::NumericVector& gamma, const double accrualDuration, const double followupTime, const bool fixedFollowup, const Rcpp::NumericVector& spendingTime, const double studyDuration);
RcppExport SEXP _lrstat_kmpower1s(SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilitySurvSEXP, SEXP typeBetaSpendingSEXP, SEXP parameterBetaSpendingSEXP, SEXP milestoneSEXP, SEXP survH0SEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambdaSEXP, SEXP gammaSEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP spendingTimeSEXP, SEXP studyDurationSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilitySurv(futilitySurvSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpending(typeBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpending(parameterBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type milestone(milestoneSEXP);
    Rcpp::traits::input_parameter< const double >::type survH0(survH0SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma(gammaSEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const double >::type studyDuration(studyDurationSEXP);
    rcpp_result_gen = Rcpp::wrap(kmpower1s(kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilitySurv, typeBetaSpending, parameterBetaSpending, milestone, survH0, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda, gamma, accrualDuration, followupTime, fixedFollowup, spendingTime, studyDuration));
    return rcpp_result_gen;
END_RCPP
}
// kmsamplesize1s
Rcpp::List kmsamplesize1s(const double beta, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilitySurv, const std::string& typeBetaSpending, const double parameterBetaSpending, const Rcpp::NumericVector& userBetaSpending, const double milestone, const double survH0, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda, const Rcpp::NumericVector& gamma, double accrualDuration, double followupTime, const bool fixedFollowup, const Rcpp::NumericVector& spendingTime, const bool rounding);
RcppExport SEXP _lrstat_kmsamplesize1s(SEXP betaSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilitySurvSEXP, SEXP typeBetaSpendingSEXP, SEXP parameterBetaSpendingSEXP, SEXP userBetaSpendingSEXP, SEXP milestoneSEXP, SEXP survH0SEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambdaSEXP, SEXP gammaSEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP spendingTimeSEXP, SEXP roundingSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilitySurv(futilitySurvSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpending(typeBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpending(parameterBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userBetaSpending(userBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type milestone(milestoneSEXP);
    Rcpp::traits::input_parameter< const double >::type survH0(survH0SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma(gammaSEXP);
    Rcpp::traits::input_parameter< double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type rounding(roundingSEXP);
    rcpp_result_gen = Rcpp::wrap(kmsamplesize1s(beta, kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilitySurv, typeBetaSpending, parameterBetaSpending, userBetaSpending, milestone, survH0, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda, gamma, accrualDuration, followupTime, fixedFollowup, spendingTime, rounding));
    return rcpp_result_gen;
END_RCPP
}
// kmpowerequiv
Rcpp::List kmpowerequiv(const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::NumericVector& criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const double milestone, const double survDiffLower, const double survDiffUpper, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const double accrualDuration, const double followupTime, const bool fixedFollowup, const Rcpp::NumericVector& spendingTime, const double studyDuration);
RcppExport SEXP _lrstat_kmpowerequiv(SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP milestoneSEXP, SEXP survDiffLowerSEXP, SEXP survDiffUpperSEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP spendingTimeSEXP, SEXP studyDurationSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type milestone(milestoneSEXP);
    Rcpp::traits::input_parameter< const double >::type survDiffLower(survDiffLowerSEXP);
    Rcpp::traits::input_parameter< const double >::type survDiffUpper(survDiffUpperSEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const double >::type studyDuration(studyDurationSEXP);
    rcpp_result_gen = Rcpp::wrap(kmpowerequiv(kMax, informationRates, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, milestone, survDiffLower, survDiffUpper, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup, spendingTime, studyDuration));
    return rcpp_result_gen;
END_RCPP
}
// kmsamplesizeequiv
Rcpp::List kmsamplesizeequiv(const double beta, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const double milestone, const double survDiffLower, const double survDiffUpper, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, double accrualDuration, double followupTime, const bool fixedFollowup, const Rcpp::NumericVector& spendingTime, const bool rounding);
RcppExport SEXP _lrstat_kmsamplesizeequiv(SEXP betaSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP milestoneSEXP, SEXP survDiffLowerSEXP, SEXP survDiffUpperSEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP spendingTimeSEXP, SEXP roundingSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type milestone(milestoneSEXP);
    Rcpp::traits::input_parameter< const double >::type survDiffLower(survDiffLowerSEXP);
    Rcpp::traits::input_parameter< const double >::type survDiffUpper(survDiffUpperSEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type rounding(roundingSEXP);
    rcpp_result_gen = Rcpp::wrap(kmsamplesizeequiv(beta, kMax, informationRates, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, milestone, survDiffLower, survDiffUpper, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup, spendingTime, rounding));
    return rcpp_result_gen;
END_RCPP
}
// logisregRcpp
Rcpp::List logisregRcpp(const Rcpp::DataFrame& data, const std::string& event, const std::vector<std::string>& covariates, const std::string& freq, const std::string& weight, const std::string& offset, const std::string& id, const std::string& link, const std::vector<double>& init, const bool robust, const bool firth, const bool flic, const bool plci, const double alpha, const int maxiter, const double eps);
RcppExport SEXP _lrstat_logisregRcpp(SEXP dataSEXP, SEXP eventSEXP, SEXP covariatesSEXP, SEXP freqSEXP, SEXP weightSEXP, SEXP offsetSEXP, SEXP idSEXP, SEXP linkSEXP, SEXP initSEXP, SEXP robustSEXP, SEXP firthSEXP, SEXP flicSEXP, SEXP plciSEXP, SEXP alphaSEXP, SEXP maxiterSEXP, SEXP epsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type data(dataSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type event(eventSEXP);
    Rcpp::traits::input_parameter< const std::vector<std::string>& >::type covariates(covariatesSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type freq(freqSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type weight(weightSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type offset(offsetSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type id(idSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type link(linkSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type init(initSEXP);
    Rcpp::traits::input_parameter< const bool >::type robust(robustSEXP);
    Rcpp::traits::input_parameter< const bool >::type firth(firthSEXP);
    Rcpp::traits::input_parameter< const bool >::type flic(flicSEXP);
    Rcpp::traits::input_parameter< const bool >::type plci(plciSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const int >::type maxiter(maxiterSEXP);
    Rcpp::traits::input_parameter< const double >::type eps(epsSEXP);
    rcpp_result_gen = Rcpp::wrap(logisregRcpp(data, event, covariates, freq, weight, offset, id, link, init, robust, firth, flic, plci, alpha, maxiter, eps));
    return rcpp_result_gen;
END_RCPP
}
// lrsimRcpp
Rcpp::List lrsimRcpp(const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::NumericVector& criticalValues, const Rcpp::NumericVector& futilityBounds, const double hazardRatioH0, const int allocation1, const int allocation2, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const int n, const double followupTime, const bool fixedFollowup, const double rho1, const double rho2, const Rcpp::IntegerVector& plannedEvents, const Rcpp::NumericVector& plannedTime, const int maxNumberOfIterations, const int maxNumberOfRawDatasetsPerStage, const int seed);
RcppExport SEXP _lrstat_lrsimRcpp(SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP criticalValuesSEXP, SEXP futilityBoundsSEXP, SEXP hazardRatioH0SEXP, SEXP allocation1SEXP, SEXP allocation2SEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP nSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP rho1SEXP, SEXP rho2SEXP, SEXP plannedEventsSEXP, SEXP plannedTimeSEXP, SEXP maxNumberOfIterationsSEXP, SEXP maxNumberOfRawDatasetsPerStageSEXP, SEXP seedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH0(hazardRatioH0SEXP);
    Rcpp::traits::input_parameter< const int >::type allocation1(allocation1SEXP);
    Rcpp::traits::input_parameter< const int >::type allocation2(allocation2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const int >::type n(nSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const double >::type rho1(rho1SEXP);
    Rcpp::traits::input_parameter< const double >::type rho2(rho2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type plannedEvents(plannedEventsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type plannedTime(plannedTimeSEXP);
    Rcpp::traits::input_parameter< const int >::type maxNumberOfIterations(maxNumberOfIterationsSEXP);
    Rcpp::traits::input_parameter< const int >::type maxNumberOfRawDatasetsPerStage(maxNumberOfRawDatasetsPerStageSEXP);
    Rcpp::traits::input_parameter< const int >::type seed(seedSEXP);
    rcpp_result_gen = Rcpp::wrap(lrsimRcpp(kMax, informationRates, criticalValues, futilityBounds, hazardRatioH0, allocation1, allocation2, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda1, lambda2, gamma1, gamma2, n, followupTime, fixedFollowup, rho1, rho2, plannedEvents, plannedTime, maxNumberOfIterations, maxNumberOfRawDatasetsPerStage, seed));
    return rcpp_result_gen;
END_RCPP
}
// lrsim3aRcpp
Rcpp::List lrsim3aRcpp(const int kMax, const double hazardRatioH013, const double hazardRatioH023, const double hazardRatioH012, const int allocation1, const int allocation2, const int allocation3, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& lambda3, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const Rcpp::NumericVector& gamma3, const int n, const double followupTime, const bool fixedFollowup, const double rho1, const double rho2, const Rcpp::IntegerVector& plannedEvents, const Rcpp::NumericVector& plannedTime, const int maxNumberOfIterations, const int maxNumberOfRawDatasetsPerStage, const int seed);
RcppExport SEXP _lrstat_lrsim3aRcpp(SEXP kMaxSEXP, SEXP hazardRatioH013SEXP, SEXP hazardRatioH023SEXP, SEXP hazardRatioH012SEXP, SEXP allocation1SEXP, SEXP allocation2SEXP, SEXP allocation3SEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP lambda3SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP gamma3SEXP, SEXP nSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP rho1SEXP, SEXP rho2SEXP, SEXP plannedEventsSEXP, SEXP plannedTimeSEXP, SEXP maxNumberOfIterationsSEXP, SEXP maxNumberOfRawDatasetsPerStageSEXP, SEXP seedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH013(hazardRatioH013SEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH023(hazardRatioH023SEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH012(hazardRatioH012SEXP);
    Rcpp::traits::input_parameter< const int >::type allocation1(allocation1SEXP);
    Rcpp::traits::input_parameter< const int >::type allocation2(allocation2SEXP);
    Rcpp::traits::input_parameter< const int >::type allocation3(allocation3SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda3(lambda3SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma3(gamma3SEXP);
    Rcpp::traits::input_parameter< const int >::type n(nSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const double >::type rho1(rho1SEXP);
    Rcpp::traits::input_parameter< const double >::type rho2(rho2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type plannedEvents(plannedEventsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type plannedTime(plannedTimeSEXP);
    Rcpp::traits::input_parameter< const int >::type maxNumberOfIterations(maxNumberOfIterationsSEXP);
    Rcpp::traits::input_parameter< const int >::type maxNumberOfRawDatasetsPerStage(maxNumberOfRawDatasetsPerStageSEXP);
    Rcpp::traits::input_parameter< const int >::type seed(seedSEXP);
    rcpp_result_gen = Rcpp::wrap(lrsim3aRcpp(kMax, hazardRatioH013, hazardRatioH023, hazardRatioH012, allocation1, allocation2, allocation3, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda1, lambda2, lambda3, gamma1, gamma2, gamma3, n, followupTime, fixedFollowup, rho1, rho2, plannedEvents, plannedTime, maxNumberOfIterations, maxNumberOfRawDatasetsPerStage, seed));
    return rcpp_result_gen;
END_RCPP
}
// lrsim2eRcpp
Rcpp::List lrsim2eRcpp(const int kMax, const int kMaxpfs, const double hazardRatioH0pfs, const double hazardRatioH0os, const int allocation1, const int allocation2, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const double rho_pd_os, const Rcpp::NumericVector& lambda1pfs, const Rcpp::NumericVector& lambda2pfs, const Rcpp::NumericVector& lambda1os, const Rcpp::NumericVector& lambda2os, const Rcpp::NumericVector& gamma1pfs, const Rcpp::NumericVector& gamma2pfs, const Rcpp::NumericVector& gamma1os, const Rcpp::NumericVector& gamma2os, const int n, const double followupTime, const bool fixedFollowup, const double rho1, const double rho2, const Rcpp::IntegerVector& plannedEvents, const Rcpp::NumericVector& plannedTime, const int maxNumberOfIterations, const int maxNumberOfRawDatasetsPerStage, const int seed);
RcppExport SEXP _lrstat_lrsim2eRcpp(SEXP kMaxSEXP, SEXP kMaxpfsSEXP, SEXP hazardRatioH0pfsSEXP, SEXP hazardRatioH0osSEXP, SEXP allocation1SEXP, SEXP allocation2SEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP rho_pd_osSEXP, SEXP lambda1pfsSEXP, SEXP lambda2pfsSEXP, SEXP lambda1osSEXP, SEXP lambda2osSEXP, SEXP gamma1pfsSEXP, SEXP gamma2pfsSEXP, SEXP gamma1osSEXP, SEXP gamma2osSEXP, SEXP nSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP rho1SEXP, SEXP rho2SEXP, SEXP plannedEventsSEXP, SEXP plannedTimeSEXP, SEXP maxNumberOfIterationsSEXP, SEXP maxNumberOfRawDatasetsPerStageSEXP, SEXP seedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const int >::type kMaxpfs(kMaxpfsSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH0pfs(hazardRatioH0pfsSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH0os(hazardRatioH0osSEXP);
    Rcpp::traits::input_parameter< const int >::type allocation1(allocation1SEXP);
    Rcpp::traits::input_parameter< const int >::type allocation2(allocation2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const double >::type rho_pd_os(rho_pd_osSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1pfs(lambda1pfsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2pfs(lambda2pfsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1os(lambda1osSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2os(lambda2osSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1pfs(gamma1pfsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2pfs(gamma2pfsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1os(gamma1osSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2os(gamma2osSEXP);
    Rcpp::traits::input_parameter< const int >::type n(nSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const double >::type rho1(rho1SEXP);
    Rcpp::traits::input_parameter< const double >::type rho2(rho2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type plannedEvents(plannedEventsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type plannedTime(plannedTimeSEXP);
    Rcpp::traits::input_parameter< const int >::type maxNumberOfIterations(maxNumberOfIterationsSEXP);
    Rcpp::traits::input_parameter< const int >::type maxNumberOfRawDatasetsPerStage(maxNumberOfRawDatasetsPerStageSEXP);
    Rcpp::traits::input_parameter< const int >::type seed(seedSEXP);
    rcpp_result_gen = Rcpp::wrap(lrsim2eRcpp(kMax, kMaxpfs, hazardRatioH0pfs, hazardRatioH0os, allocation1, allocation2, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, rho_pd_os, lambda1pfs, lambda2pfs, lambda1os, lambda2os, gamma1pfs, gamma2pfs, gamma1os, gamma2os, n, followupTime, fixedFollowup, rho1, rho2, plannedEvents, plannedTime, maxNumberOfIterations, maxNumberOfRawDatasetsPerStage, seed));
    return rcpp_result_gen;
END_RCPP
}
// lrsim2e3aRcpp
Rcpp::List lrsim2e3aRcpp(const int kMax, const int kMaxpfs, const double hazardRatioH013pfs, const double hazardRatioH023pfs, const double hazardRatioH012pfs, const double hazardRatioH013os, const double hazardRatioH023os, const double hazardRatioH012os, const int allocation1, const int allocation2, const int allocation3, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const double rho_pd_os, const Rcpp::NumericVector& lambda1pfs, const Rcpp::NumericVector& lambda2pfs, const Rcpp::NumericVector& lambda3pfs, const Rcpp::NumericVector& lambda1os, const Rcpp::NumericVector& lambda2os, const Rcpp::NumericVector& lambda3os, const Rcpp::NumericVector& gamma1pfs, const Rcpp::NumericVector& gamma2pfs, const Rcpp::NumericVector& gamma3pfs, const Rcpp::NumericVector& gamma1os, const Rcpp::NumericVector& gamma2os, const Rcpp::NumericVector& gamma3os, const int n, const double followupTime, const bool fixedFollowup, const double rho1, const double rho2, const Rcpp::IntegerVector& plannedEvents, const Rcpp::NumericVector& plannedTime, const int maxNumberOfIterations, const int maxNumberOfRawDatasetsPerStage, const int seed);
RcppExport SEXP _lrstat_lrsim2e3aRcpp(SEXP kMaxSEXP, SEXP kMaxpfsSEXP, SEXP hazardRatioH013pfsSEXP, SEXP hazardRatioH023pfsSEXP, SEXP hazardRatioH012pfsSEXP, SEXP hazardRatioH013osSEXP, SEXP hazardRatioH023osSEXP, SEXP hazardRatioH012osSEXP, SEXP allocation1SEXP, SEXP allocation2SEXP, SEXP allocation3SEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP rho_pd_osSEXP, SEXP lambda1pfsSEXP, SEXP lambda2pfsSEXP, SEXP lambda3pfsSEXP, SEXP lambda1osSEXP, SEXP lambda2osSEXP, SEXP lambda3osSEXP, SEXP gamma1pfsSEXP, SEXP gamma2pfsSEXP, SEXP gamma3pfsSEXP, SEXP gamma1osSEXP, SEXP gamma2osSEXP, SEXP gamma3osSEXP, SEXP nSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP rho1SEXP, SEXP rho2SEXP, SEXP plannedEventsSEXP, SEXP plannedTimeSEXP, SEXP maxNumberOfIterationsSEXP, SEXP maxNumberOfRawDatasetsPerStageSEXP, SEXP seedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const int >::type kMaxpfs(kMaxpfsSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH013pfs(hazardRatioH013pfsSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH023pfs(hazardRatioH023pfsSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH012pfs(hazardRatioH012pfsSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH013os(hazardRatioH013osSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH023os(hazardRatioH023osSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH012os(hazardRatioH012osSEXP);
    Rcpp::traits::input_parameter< const int >::type allocation1(allocation1SEXP);
    Rcpp::traits::input_parameter< const int >::type allocation2(allocation2SEXP);
    Rcpp::traits::input_parameter< const int >::type allocation3(allocation3SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const double >::type rho_pd_os(rho_pd_osSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1pfs(lambda1pfsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2pfs(lambda2pfsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda3pfs(lambda3pfsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1os(lambda1osSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2os(lambda2osSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda3os(lambda3osSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1pfs(gamma1pfsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2pfs(gamma2pfsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma3pfs(gamma3pfsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1os(gamma1osSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2os(gamma2osSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma3os(gamma3osSEXP);
    Rcpp::traits::input_parameter< const int >::type n(nSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const double >::type rho1(rho1SEXP);
    Rcpp::traits::input_parameter< const double >::type rho2(rho2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type plannedEvents(plannedEventsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type plannedTime(plannedTimeSEXP);
    Rcpp::traits::input_parameter< const int >::type maxNumberOfIterations(maxNumberOfIterationsSEXP);
    Rcpp::traits::input_parameter< const int >::type maxNumberOfRawDatasetsPerStage(maxNumberOfRawDatasetsPerStageSEXP);
    Rcpp::traits::input_parameter< const int >::type seed(seedSEXP);
    rcpp_result_gen = Rcpp::wrap(lrsim2e3aRcpp(kMax, kMaxpfs, hazardRatioH013pfs, hazardRatioH023pfs, hazardRatioH012pfs, hazardRatioH013os, hazardRatioH023os, hazardRatioH012os, allocation1, allocation2, allocation3, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, rho_pd_os, lambda1pfs, lambda2pfs, lambda3pfs, lambda1os, lambda2os, lambda3os, gamma1pfs, gamma2pfs, gamma3pfs, gamma1os, gamma2os, gamma3os, n, followupTime, fixedFollowup, rho1, rho2, plannedEvents, plannedTime, maxNumberOfIterations, maxNumberOfRawDatasetsPerStage, seed));
    return rcpp_result_gen;
END_RCPP
}
// lrsimsubRcpp
Rcpp::List lrsimsubRcpp(const int kMax, const int kMaxitt, const double hazardRatioH0itt, const double hazardRatioH0pos, const double hazardRatioH0neg, const int allocation1, const int allocation2, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& p_pos, const Rcpp::NumericVector& lambda1itt, const Rcpp::NumericVector& lambda2itt, const Rcpp::NumericVector& lambda1pos, const Rcpp::NumericVector& lambda2pos, const Rcpp::NumericVector& gamma1itt, const Rcpp::NumericVector& gamma2itt, const Rcpp::NumericVector& gamma1pos, const Rcpp::NumericVector& gamma2pos, const int n, const double followupTime, const bool fixedFollowup, const double rho1, const double rho2, const Rcpp::IntegerVector& plannedEvents, const Rcpp::NumericVector& plannedTime, const int maxNumberOfIterations, const int maxNumberOfRawDatasetsPerStage, const int seed);
RcppExport SEXP _lrstat_lrsimsubRcpp(SEXP kMaxSEXP, SEXP kMaxittSEXP, SEXP hazardRatioH0ittSEXP, SEXP hazardRatioH0posSEXP, SEXP hazardRatioH0negSEXP, SEXP allocation1SEXP, SEXP allocation2SEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP p_posSEXP, SEXP lambda1ittSEXP, SEXP lambda2ittSEXP, SEXP lambda1posSEXP, SEXP lambda2posSEXP, SEXP gamma1ittSEXP, SEXP gamma2ittSEXP, SEXP gamma1posSEXP, SEXP gamma2posSEXP, SEXP nSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP rho1SEXP, SEXP rho2SEXP, SEXP plannedEventsSEXP, SEXP plannedTimeSEXP, SEXP maxNumberOfIterationsSEXP, SEXP maxNumberOfRawDatasetsPerStageSEXP, SEXP seedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const int >::type kMaxitt(kMaxittSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH0itt(hazardRatioH0ittSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH0pos(hazardRatioH0posSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH0neg(hazardRatioH0negSEXP);
    Rcpp::traits::input_parameter< const int >::type allocation1(allocation1SEXP);
    Rcpp::traits::input_parameter< const int >::type allocation2(allocation2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type p_pos(p_posSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1itt(lambda1ittSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2itt(lambda2ittSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1pos(lambda1posSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2pos(lambda2posSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1itt(gamma1ittSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2itt(gamma2ittSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1pos(gamma1posSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2pos(gamma2posSEXP);
    Rcpp::traits::input_parameter< const int >::type n(nSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const double >::type rho1(rho1SEXP);
    Rcpp::traits::input_parameter< const double >::type rho2(rho2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type plannedEvents(plannedEventsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type plannedTime(plannedTimeSEXP);
    Rcpp::traits::input_parameter< const int >::type maxNumberOfIterations(maxNumberOfIterationsSEXP);
    Rcpp::traits::input_parameter< const int >::type maxNumberOfRawDatasetsPerStage(maxNumberOfRawDatasetsPerStageSEXP);
    Rcpp::traits::input_parameter< const int >::type seed(seedSEXP);
    rcpp_result_gen = Rcpp::wrap(lrsimsubRcpp(kMax, kMaxitt, hazardRatioH0itt, hazardRatioH0pos, hazardRatioH0neg, allocation1, allocation2, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, p_pos, lambda1itt, lambda2itt, lambda1pos, lambda2pos, gamma1itt, gamma2itt, gamma1pos, gamma2pos, n, followupTime, fixedFollowup, rho1, rho2, plannedEvents, plannedTime, maxNumberOfIterations, maxNumberOfRawDatasetsPerStage, seed));
    return rcpp_result_gen;
END_RCPP
}
// binary_tte_simRcpp
Rcpp::List binary_tte_simRcpp(const int kMax1, const int kMax2, const double riskDiffH0, const double hazardRatioH0, const int allocation1, const int allocation2, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const double globalOddsRatio, const Rcpp::NumericVector& pi1, const Rcpp::NumericVector& pi2, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const Rcpp::NumericVector& delta1, const Rcpp::NumericVector& delta2, const double upper1, const double upper2, const int n, const Rcpp::NumericVector& plannedTime, const Rcpp::IntegerVector& plannedEvents, const int maxNumberOfIterations, const int maxNumberOfRawDatasetsPerStage, const int seed);
RcppExport SEXP _lrstat_binary_tte_simRcpp(SEXP kMax1SEXP, SEXP kMax2SEXP, SEXP riskDiffH0SEXP, SEXP hazardRatioH0SEXP, SEXP allocation1SEXP, SEXP allocation2SEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP globalOddsRatioSEXP, SEXP pi1SEXP, SEXP pi2SEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP delta1SEXP, SEXP delta2SEXP, SEXP upper1SEXP, SEXP upper2SEXP, SEXP nSEXP, SEXP plannedTimeSEXP, SEXP plannedEventsSEXP, SEXP maxNumberOfIterationsSEXP, SEXP maxNumberOfRawDatasetsPerStageSEXP, SEXP seedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type kMax1(kMax1SEXP);
    Rcpp::traits::input_parameter< const int >::type kMax2(kMax2SEXP);
    Rcpp::traits::input_parameter< const double >::type riskDiffH0(riskDiffH0SEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH0(hazardRatioH0SEXP);
    Rcpp::traits::input_parameter< const int >::type allocation1(allocation1SEXP);
    Rcpp::traits::input_parameter< const int >::type allocation2(allocation2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const double >::type globalOddsRatio(globalOddsRatioSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type pi1(pi1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type pi2(pi2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type delta1(delta1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type delta2(delta2SEXP);
    Rcpp::traits::input_parameter< const double >::type upper1(upper1SEXP);
    Rcpp::traits::input_parameter< const double >::type upper2(upper2SEXP);
    Rcpp::traits::input_parameter< const int >::type n(nSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type plannedTime(plannedTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type plannedEvents(plannedEventsSEXP);
    Rcpp::traits::input_parameter< const int >::type maxNumberOfIterations(maxNumberOfIterationsSEXP);
    Rcpp::traits::input_parameter< const int >::type maxNumberOfRawDatasetsPerStage(maxNumberOfRawDatasetsPerStageSEXP);
    Rcpp::traits::input_parameter< const int >::type seed(seedSEXP);
    rcpp_result_gen = Rcpp::wrap(binary_tte_simRcpp(kMax1, kMax2, riskDiffH0, hazardRatioH0, allocation1, allocation2, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, globalOddsRatio, pi1, pi2, lambda1, lambda2, gamma1, gamma2, delta1, delta2, upper1, upper2, n, plannedTime, plannedEvents, maxNumberOfIterations, maxNumberOfRawDatasetsPerStage, seed));
    return rcpp_result_gen;
END_RCPP
}
// lrsim_mams_Rcpp
Rcpp::List lrsim_mams_Rcpp(const int M, const int kMax, const Rcpp::Nullable<Rcpp::NumericMatrix> criticalValues, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::NumericVector& hazardRatioH0s, const Rcpp::NumericVector& allocations, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::Nullable<Rcpp::List> lambdas, const Rcpp::Nullable<Rcpp::List> gammas, const int n, const double followupTime, const bool fixedFollowup, const double rho1, const double rho2, const Rcpp::IntegerVector& plannedEvents, const Rcpp::NumericVector& plannedTime, const int maxNumberOfIterations, const int maxNumberOfRawDatasetsPerStage, const int seed);
RcppExport SEXP _lrstat_lrsim_mams_Rcpp(SEXP MSEXP, SEXP kMaxSEXP, SEXP criticalValuesSEXP, SEXP futilityBoundsSEXP, SEXP hazardRatioH0sSEXP, SEXP allocationsSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambdasSEXP, SEXP gammasSEXP, SEXP nSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP rho1SEXP, SEXP rho2SEXP, SEXP plannedEventsSEXP, SEXP plannedTimeSEXP, SEXP maxNumberOfIterationsSEXP, SEXP maxNumberOfRawDatasetsPerStageSEXP, SEXP seedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type M(MSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericMatrix> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type hazardRatioH0s(hazardRatioH0sSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type allocations(allocationsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::List> >::type lambdas(lambdasSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::List> >::type gammas(gammasSEXP);
    Rcpp::traits::input_parameter< const int >::type n(nSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const double >::type rho1(rho1SEXP);
    Rcpp::traits::input_parameter< const double >::type rho2(rho2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type plannedEvents(plannedEventsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type plannedTime(plannedTimeSEXP);
    Rcpp::traits::input_parameter< const int >::type maxNumberOfIterations(maxNumberOfIterationsSEXP);
    Rcpp::traits::input_parameter< const int >::type maxNumberOfRawDatasetsPerStage(maxNumberOfRawDatasetsPerStageSEXP);
    Rcpp::traits::input_parameter< const int >::type seed(seedSEXP);
    rcpp_result_gen = Rcpp::wrap(lrsim_mams_Rcpp(M, kMax, criticalValues, futilityBounds, hazardRatioH0s, allocations, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambdas, gammas, n, followupTime, fixedFollowup, rho1, rho2, plannedEvents, plannedTime, maxNumberOfIterations, maxNumberOfRawDatasetsPerStage, seed));
    return rcpp_result_gen;
END_RCPP
}
// lrsim_seamless_Rcpp
Rcpp::List lrsim_seamless_Rcpp(const int M, const int K, const Rcpp::NumericVector& criticalValues, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::NumericVector& hazardRatioH0s, const Rcpp::NumericVector& allocations, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::Nullable<Rcpp::List> lambdas, const Rcpp::Nullable<Rcpp::List> gammas, const int n, const double followupTime, const bool fixedFollowup, const double rho1, const double rho2, const Rcpp::IntegerVector& plannedEvents, const Rcpp::NumericVector& plannedTime, const int maxNumberOfIterations, const int maxNumberOfRawDatasetsPerStage, const int seed);
RcppExport SEXP _lrstat_lrsim_seamless_Rcpp(SEXP MSEXP, SEXP KSEXP, SEXP criticalValuesSEXP, SEXP futilityBoundsSEXP, SEXP hazardRatioH0sSEXP, SEXP allocationsSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambdasSEXP, SEXP gammasSEXP, SEXP nSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP rho1SEXP, SEXP rho2SEXP, SEXP plannedEventsSEXP, SEXP plannedTimeSEXP, SEXP maxNumberOfIterationsSEXP, SEXP maxNumberOfRawDatasetsPerStageSEXP, SEXP seedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type M(MSEXP);
    Rcpp::traits::input_parameter< const int >::type K(KSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type hazardRatioH0s(hazardRatioH0sSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type allocations(allocationsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::List> >::type lambdas(lambdasSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::List> >::type gammas(gammasSEXP);
    Rcpp::traits::input_parameter< const int >::type n(nSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const double >::type rho1(rho1SEXP);
    Rcpp::traits::input_parameter< const double >::type rho2(rho2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type plannedEvents(plannedEventsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type plannedTime(plannedTimeSEXP);
    Rcpp::traits::input_parameter< const int >::type maxNumberOfIterations(maxNumberOfIterationsSEXP);
    Rcpp::traits::input_parameter< const int >::type maxNumberOfRawDatasetsPerStage(maxNumberOfRawDatasetsPerStageSEXP);
    Rcpp::traits::input_parameter< const int >::type seed(seedSEXP);
    rcpp_result_gen = Rcpp::wrap(lrsim_seamless_Rcpp(M, K, criticalValues, futilityBounds, hazardRatioH0s, allocations, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambdas, gammas, n, followupTime, fixedFollowup, rho1, rho2, plannedEvents, plannedTime, maxNumberOfIterations, maxNumberOfRawDatasetsPerStage, seed));
    return rcpp_result_gen;
END_RCPP
}
// kmsurv
Rcpp::NumericVector kmsurv(const Rcpp::NumericVector& time, const double allocationRatioPlanned, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2);
RcppExport SEXP _lrstat_kmsurv(SEXP timeSEXP, SEXP allocationRatioPlannedSEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    rcpp_result_gen = Rcpp::wrap(kmsurv(time, allocationRatioPlanned, piecewiseSurvivalTime, lambda1, lambda2, gamma1, gamma2));
    return rcpp_result_gen;
END_RCPP
}
// lrstat
Rcpp::DataFrame lrstat(const Rcpp::NumericVector& time, const double hazardRatioH0, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const double accrualDuration, const double followupTime, const bool fixedFollowup, const double rho1, const double rho2, const int predictTarget);
RcppExport SEXP _lrstat_lrstat(SEXP timeSEXP, SEXP hazardRatioH0SEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP rho1SEXP, SEXP rho2SEXP, SEXP predictTargetSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH0(hazardRatioH0SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const double >::type rho1(rho1SEXP);
    Rcpp::traits::input_parameter< const double >::type rho2(rho2SEXP);
    Rcpp::traits::input_parameter< const int >::type predictTarget(predictTargetSEXP);
    rcpp_result_gen = Rcpp::wrap(lrstat(time, hazardRatioH0, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup, rho1, rho2, predictTarget));
    return rcpp_result_gen;
END_RCPP
}
// caltime
Rcpp::NumericVector caltime(const Rcpp::NumericVector& nevents, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const double accrualDuration, const double followupTime, const bool fixedFollowup);
RcppExport SEXP _lrstat_caltime(SEXP neventsSEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type nevents(neventsSEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    rcpp_result_gen = Rcpp::wrap(caltime(nevents, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup));
    return rcpp_result_gen;
END_RCPP
}
// getDurationFromNevents
Rcpp::DataFrame getDurationFromNevents(const double nevents, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const double followupTime, const bool fixedFollowup, const int npoints);
RcppExport SEXP _lrstat_getDurationFromNevents(SEXP neventsSEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP npointsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type nevents(neventsSEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const int >::type npoints(npointsSEXP);
    rcpp_result_gen = Rcpp::wrap(getDurationFromNevents(nevents, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda1, lambda2, gamma1, gamma2, followupTime, fixedFollowup, npoints));
    return rcpp_result_gen;
END_RCPP
}
// lrpower
Rcpp::List lrpower(const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityHR, const std::string& typeBetaSpending, const double parameterBetaSpending, const double hazardRatioH0, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const double accrualDuration, const double followupTime, const bool fixedFollowup, const double rho1, const double rho2, const std::string& typeOfComputation, const Rcpp::NumericVector& spendingTime, const double studyDuration);
RcppExport SEXP _lrstat_lrpower(SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityHRSEXP, SEXP typeBetaSpendingSEXP, SEXP parameterBetaSpendingSEXP, SEXP hazardRatioH0SEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP rho1SEXP, SEXP rho2SEXP, SEXP typeOfComputationSEXP, SEXP spendingTimeSEXP, SEXP studyDurationSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityHR(futilityHRSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpending(typeBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpending(parameterBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH0(hazardRatioH0SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const double >::type rho1(rho1SEXP);
    Rcpp::traits::input_parameter< const double >::type rho2(rho2SEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeOfComputation(typeOfComputationSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const double >::type studyDuration(studyDurationSEXP);
    rcpp_result_gen = Rcpp::wrap(lrpower(kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityHR, typeBetaSpending, parameterBetaSpending, hazardRatioH0, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup, rho1, rho2, typeOfComputation, spendingTime, studyDuration));
    return rcpp_result_gen;
END_RCPP
}
// getNeventsFromHazardRatio
double getNeventsFromHazardRatio(const double beta, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityHR, const std::string& typeBetaSpending, const double parameterBetaSpending, const Rcpp::NumericVector& userBetaSpending, const Rcpp::NumericVector& spendingTime, const double hazardRatioH0, const double hazardRatio, const double allocationRatioPlanned, const bool rounding);
RcppExport SEXP _lrstat_getNeventsFromHazardRatio(SEXP betaSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityHRSEXP, SEXP typeBetaSpendingSEXP, SEXP parameterBetaSpendingSEXP, SEXP userBetaSpendingSEXP, SEXP spendingTimeSEXP, SEXP hazardRatioH0SEXP, SEXP hazardRatioSEXP, SEXP allocationRatioPlannedSEXP, SEXP roundingSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityHR(futilityHRSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpending(typeBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpending(parameterBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userBetaSpending(userBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH0(hazardRatioH0SEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatio(hazardRatioSEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const bool >::type rounding(roundingSEXP);
    rcpp_result_gen = Rcpp::wrap(getNeventsFromHazardRatio(beta, kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityHR, typeBetaSpending, parameterBetaSpending, userBetaSpending, spendingTime, hazardRatioH0, hazardRatio, allocationRatioPlanned, rounding));
    return rcpp_result_gen;
END_RCPP
}
// lrsamplesize
Rcpp::List lrsamplesize(const double beta, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityHR, const std::string& typeBetaSpending, const double parameterBetaSpending, const Rcpp::NumericVector& userBetaSpending, const double hazardRatioH0, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, double accrualDuration, double followupTime, const bool fixedFollowup, const double rho1, const double rho2, const std::string& typeOfComputation, const Rcpp::NumericVector& spendingTime, const bool rounding);
RcppExport SEXP _lrstat_lrsamplesize(SEXP betaSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityHRSEXP, SEXP typeBetaSpendingSEXP, SEXP parameterBetaSpendingSEXP, SEXP userBetaSpendingSEXP, SEXP hazardRatioH0SEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP rho1SEXP, SEXP rho2SEXP, SEXP typeOfComputationSEXP, SEXP spendingTimeSEXP, SEXP roundingSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityHR(futilityHRSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpending(typeBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpending(parameterBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userBetaSpending(userBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioH0(hazardRatioH0SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const double >::type rho1(rho1SEXP);
    Rcpp::traits::input_parameter< const double >::type rho2(rho2SEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeOfComputation(typeOfComputationSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type rounding(roundingSEXP);
    rcpp_result_gen = Rcpp::wrap(lrsamplesize(beta, kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityHR, typeBetaSpending, parameterBetaSpending, userBetaSpending, hazardRatioH0, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup, rho1, rho2, typeOfComputation, spendingTime, rounding));
    return rcpp_result_gen;
END_RCPP
}
// lrpowerequiv
Rcpp::List lrpowerequiv(const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const double hazardRatioLower, const double hazardRatioUpper, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const double accrualDuration, const double followupTime, const bool fixedFollowup, const std::string& typeOfComputation, const Rcpp::NumericVector& spendingTime, const double studyDuration);
RcppExport SEXP _lrstat_lrpowerequiv(SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP hazardRatioLowerSEXP, SEXP hazardRatioUpperSEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP typeOfComputationSEXP, SEXP spendingTimeSEXP, SEXP studyDurationSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioLower(hazardRatioLowerSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioUpper(hazardRatioUpperSEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeOfComputation(typeOfComputationSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const double >::type studyDuration(studyDurationSEXP);
    rcpp_result_gen = Rcpp::wrap(lrpowerequiv(kMax, informationRates, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, hazardRatioLower, hazardRatioUpper, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup, typeOfComputation, spendingTime, studyDuration));
    return rcpp_result_gen;
END_RCPP
}
// lrsamplesizeequiv
Rcpp::List lrsamplesizeequiv(const double beta, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const double hazardRatioLower, const double hazardRatioUpper, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, double accrualDuration, double followupTime, const bool fixedFollowup, const std::string& typeOfComputation, const Rcpp::NumericVector& spendingTime, const bool rounding);
RcppExport SEXP _lrstat_lrsamplesizeequiv(SEXP betaSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP hazardRatioLowerSEXP, SEXP hazardRatioUpperSEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP typeOfComputationSEXP, SEXP spendingTimeSEXP, SEXP roundingSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioLower(hazardRatioLowerSEXP);
    Rcpp::traits::input_parameter< const double >::type hazardRatioUpper(hazardRatioUpperSEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeOfComputation(typeOfComputationSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type rounding(roundingSEXP);
    rcpp_result_gen = Rcpp::wrap(lrsamplesizeequiv(beta, kMax, informationRates, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, hazardRatioLower, hazardRatioUpper, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup, typeOfComputation, spendingTime, rounding));
    return rcpp_result_gen;
END_RCPP
}
// exitprob_mams
Rcpp::List exitprob_mams(const int M, const double r, const Rcpp::NumericVector& theta, const bool corr_known, const int kMax, SEXP b, SEXP a, SEXP I);
RcppExport SEXP _lrstat_exitprob_mams(SEXP MSEXP, SEXP rSEXP, SEXP thetaSEXP, SEXP corr_knownSEXP, SEXP kMaxSEXP, SEXP bSEXP, SEXP aSEXP, SEXP ISEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type M(MSEXP);
    Rcpp::traits::input_parameter< const double >::type r(rSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type theta(thetaSEXP);
    Rcpp::traits::input_parameter< const bool >::type corr_known(corr_knownSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< SEXP >::type b(bSEXP);
    Rcpp::traits::input_parameter< SEXP >::type a(aSEXP);
    Rcpp::traits::input_parameter< SEXP >::type I(ISEXP);
    rcpp_result_gen = Rcpp::wrap(exitprob_mams(M, r, theta, corr_known, kMax, b, a, I));
    return rcpp_result_gen;
END_RCPP
}
// getBound_mams
Rcpp::NumericVector getBound_mams(const int M, const double r, const bool corr_known, const int k, const Rcpp::NumericVector& informationRates, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::NumericVector& spendingTime, const Rcpp::LogicalVector& efficacyStopping);
RcppExport SEXP _lrstat_getBound_mams(SEXP MSEXP, SEXP rSEXP, SEXP corr_knownSEXP, SEXP kSEXP, SEXP informationRatesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP spendingTimeSEXP, SEXP efficacyStoppingSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type M(MSEXP);
    Rcpp::traits::input_parameter< const double >::type r(rSEXP);
    Rcpp::traits::input_parameter< const bool >::type corr_known(corr_knownSEXP);
    Rcpp::traits::input_parameter< const int >::type k(kSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    rcpp_result_gen = Rcpp::wrap(getBound_mams(M, r, corr_known, k, informationRates, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, spendingTime, efficacyStopping));
    return rcpp_result_gen;
END_RCPP
}
// getDesign_mams
Rcpp::List getDesign_mams(const double beta, const double IMax, const Rcpp::NumericVector& theta, const int M, const double r, const bool corr_known, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericMatrix> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityTheta, const std::string& typeBetaSpending, const double parameterBetaSpending, const Rcpp::NumericVector& userBetaSpending, const Rcpp::NumericVector& spendingTime);
RcppExport SEXP _lrstat_getDesign_mams(SEXP betaSEXP, SEXP IMaxSEXP, SEXP thetaSEXP, SEXP MSEXP, SEXP rSEXP, SEXP corr_knownSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityThetaSEXP, SEXP typeBetaSpendingSEXP, SEXP parameterBetaSpendingSEXP, SEXP userBetaSpendingSEXP, SEXP spendingTimeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const double >::type IMax(IMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type theta(thetaSEXP);
    Rcpp::traits::input_parameter< const int >::type M(MSEXP);
    Rcpp::traits::input_parameter< const double >::type r(rSEXP);
    Rcpp::traits::input_parameter< const bool >::type corr_known(corr_knownSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericMatrix> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityTheta(futilityThetaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpending(typeBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpending(parameterBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userBetaSpending(userBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    rcpp_result_gen = Rcpp::wrap(getDesign_mams(beta, IMax, theta, M, r, corr_known, kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityTheta, typeBetaSpending, parameterBetaSpending, userBetaSpending, spendingTime));
    return rcpp_result_gen;
END_RCPP
}
// adaptDesign_mams
Rcpp::List adaptDesign_mams(double betaNew, double INew, const int M, const double r, const bool corr_known, const int L, const Rcpp::NumericVector& zL, const Rcpp::NumericVector& theta, const double IMax, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericMatrix> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityTheta, const Rcpp::NumericVector& spendingTime, const bool MullerSchafer, const int MNew, const Rcpp::IntegerVector& selected, const double rNew, const int kNew, const Rcpp::NumericVector& informationRatesNew, const Rcpp::LogicalVector& efficacyStoppingNew, const Rcpp::LogicalVector& futilityStoppingNew, const std::string& typeAlphaSpendingNew, const double parameterAlphaSpendingNew, const Rcpp::Nullable<Rcpp::NumericVector> futilityBoundsInt, const Rcpp::Nullable<Rcpp::NumericVector> futilityCPInt, const Rcpp::Nullable<Rcpp::NumericVector> futilityThetaInt, const std::string& typeBetaSpendingNew, const double parameterBetaSpendingNew, const Rcpp::NumericVector& userBetaSpendingNew, const Rcpp::NumericVector& spendingTimeNew);
RcppExport SEXP _lrstat_adaptDesign_mams(SEXP betaNewSEXP, SEXP INewSEXP, SEXP MSEXP, SEXP rSEXP, SEXP corr_knownSEXP, SEXP LSEXP, SEXP zLSEXP, SEXP thetaSEXP, SEXP IMaxSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityThetaSEXP, SEXP spendingTimeSEXP, SEXP MullerSchaferSEXP, SEXP MNewSEXP, SEXP selectedSEXP, SEXP rNewSEXP, SEXP kNewSEXP, SEXP informationRatesNewSEXP, SEXP efficacyStoppingNewSEXP, SEXP futilityStoppingNewSEXP, SEXP typeAlphaSpendingNewSEXP, SEXP parameterAlphaSpendingNewSEXP, SEXP futilityBoundsIntSEXP, SEXP futilityCPIntSEXP, SEXP futilityThetaIntSEXP, SEXP typeBetaSpendingNewSEXP, SEXP parameterBetaSpendingNewSEXP, SEXP userBetaSpendingNewSEXP, SEXP spendingTimeNewSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type betaNew(betaNewSEXP);
    Rcpp::traits::input_parameter< double >::type INew(INewSEXP);
    Rcpp::traits::input_parameter< const int >::type M(MSEXP);
    Rcpp::traits::input_parameter< const double >::type r(rSEXP);
    Rcpp::traits::input_parameter< const bool >::type corr_known(corr_knownSEXP);
    Rcpp::traits::input_parameter< const int >::type L(LSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type zL(zLSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type theta(thetaSEXP);
    Rcpp::traits::input_parameter< const double >::type IMax(IMaxSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericMatrix> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityTheta(futilityThetaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type MullerSchafer(MullerSchaferSEXP);
    Rcpp::traits::input_parameter< const int >::type MNew(MNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type selected(selectedSEXP);
    Rcpp::traits::input_parameter< const double >::type rNew(rNewSEXP);
    Rcpp::traits::input_parameter< const int >::type kNew(kNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRatesNew(informationRatesNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStoppingNew(efficacyStoppingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStoppingNew(futilityStoppingNewSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpendingNew(typeAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpendingNew(parameterAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBoundsInt(futilityBoundsIntSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCPInt(futilityCPIntSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityThetaInt(futilityThetaIntSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpendingNew(typeBetaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpendingNew(parameterBetaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userBetaSpendingNew(userBetaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTimeNew(spendingTimeNewSEXP);
    rcpp_result_gen = Rcpp::wrap(adaptDesign_mams(betaNew, INew, M, r, corr_known, L, zL, theta, IMax, kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityTheta, spendingTime, MullerSchafer, MNew, selected, rNew, kNew, informationRatesNew, efficacyStoppingNew, futilityStoppingNew, typeAlphaSpendingNew, parameterAlphaSpendingNew, futilityBoundsInt, futilityCPInt, futilityThetaInt, typeBetaSpendingNew, parameterBetaSpendingNew, userBetaSpendingNew, spendingTimeNew));
    return rcpp_result_gen;
END_RCPP
}
// remlRiskDiff
std::vector<double> remlRiskDiff(const double n1, const double y1, const double n2, const double y2, const double riskDiffH0);
RcppExport SEXP _lrstat_remlRiskDiff(SEXP n1SEXP, SEXP y1SEXP, SEXP n2SEXP, SEXP y2SEXP, SEXP riskDiffH0SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type n1(n1SEXP);
    Rcpp::traits::input_parameter< const double >::type y1(y1SEXP);
    Rcpp::traits::input_parameter< const double >::type n2(n2SEXP);
    Rcpp::traits::input_parameter< const double >::type y2(y2SEXP);
    Rcpp::traits::input_parameter< const double >::type riskDiffH0(riskDiffH0SEXP);
    rcpp_result_gen = Rcpp::wrap(remlRiskDiff(n1, y1, n2, y2, riskDiffH0));
    return rcpp_result_gen;
END_RCPP
}
// zstatRiskDiff
double zstatRiskDiff(const std::vector<double>& n1, const std::vector<double>& y1, const std::vector<double>& n2, const std::vector<double>& y2, const double riskDiffH0);
RcppExport SEXP _lrstat_zstatRiskDiff(SEXP n1SEXP, SEXP y1SEXP, SEXP n2SEXP, SEXP y2SEXP, SEXP riskDiffH0SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type n1(n1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y1(y1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type n2(n2SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y2(y2SEXP);
    Rcpp::traits::input_parameter< const double >::type riskDiffH0(riskDiffH0SEXP);
    rcpp_result_gen = Rcpp::wrap(zstatRiskDiff(n1, y1, n2, y2, riskDiffH0));
    return rcpp_result_gen;
END_RCPP
}
// mnRiskDiffCI
Rcpp::DataFrame mnRiskDiffCI(const std::vector<double>& n1, const std::vector<double>& y1, const std::vector<double>& n2, const std::vector<double>& y2, const double cilevel);
RcppExport SEXP _lrstat_mnRiskDiffCI(SEXP n1SEXP, SEXP y1SEXP, SEXP n2SEXP, SEXP y2SEXP, SEXP cilevelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type n1(n1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y1(y1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type n2(n2SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y2(y2SEXP);
    Rcpp::traits::input_parameter< const double >::type cilevel(cilevelSEXP);
    rcpp_result_gen = Rcpp::wrap(mnRiskDiffCI(n1, y1, n2, y2, cilevel));
    return rcpp_result_gen;
END_RCPP
}
// remlRiskRatio
std::vector<double> remlRiskRatio(const double n1, const double y1, const double n2, const double y2, const double riskRatioH0);
RcppExport SEXP _lrstat_remlRiskRatio(SEXP n1SEXP, SEXP y1SEXP, SEXP n2SEXP, SEXP y2SEXP, SEXP riskRatioH0SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type n1(n1SEXP);
    Rcpp::traits::input_parameter< const double >::type y1(y1SEXP);
    Rcpp::traits::input_parameter< const double >::type n2(n2SEXP);
    Rcpp::traits::input_parameter< const double >::type y2(y2SEXP);
    Rcpp::traits::input_parameter< const double >::type riskRatioH0(riskRatioH0SEXP);
    rcpp_result_gen = Rcpp::wrap(remlRiskRatio(n1, y1, n2, y2, riskRatioH0));
    return rcpp_result_gen;
END_RCPP
}
// zstatRiskRatio
double zstatRiskRatio(const std::vector<double>& n1, const std::vector<double>& y1, const std::vector<double>& n2, const std::vector<double>& y2, const double riskRatioH0);
RcppExport SEXP _lrstat_zstatRiskRatio(SEXP n1SEXP, SEXP y1SEXP, SEXP n2SEXP, SEXP y2SEXP, SEXP riskRatioH0SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type n1(n1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y1(y1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type n2(n2SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y2(y2SEXP);
    Rcpp::traits::input_parameter< const double >::type riskRatioH0(riskRatioH0SEXP);
    rcpp_result_gen = Rcpp::wrap(zstatRiskRatio(n1, y1, n2, y2, riskRatioH0));
    return rcpp_result_gen;
END_RCPP
}
// mnRiskRatioCI
Rcpp::DataFrame mnRiskRatioCI(const std::vector<double>& n1, const std::vector<double>& y1, const std::vector<double>& n2, const std::vector<double>& y2, const double cilevel);
RcppExport SEXP _lrstat_mnRiskRatioCI(SEXP n1SEXP, SEXP y1SEXP, SEXP n2SEXP, SEXP y2SEXP, SEXP cilevelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type n1(n1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y1(y1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type n2(n2SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y2(y2SEXP);
    Rcpp::traits::input_parameter< const double >::type cilevel(cilevelSEXP);
    rcpp_result_gen = Rcpp::wrap(mnRiskRatioCI(n1, y1, n2, y2, cilevel));
    return rcpp_result_gen;
END_RCPP
}
// remlOddsRatio
std::vector<double> remlOddsRatio(const double n1, const double y1, const double n2, const double y2, const double oddsRatioH0);
RcppExport SEXP _lrstat_remlOddsRatio(SEXP n1SEXP, SEXP y1SEXP, SEXP n2SEXP, SEXP y2SEXP, SEXP oddsRatioH0SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type n1(n1SEXP);
    Rcpp::traits::input_parameter< const double >::type y1(y1SEXP);
    Rcpp::traits::input_parameter< const double >::type n2(n2SEXP);
    Rcpp::traits::input_parameter< const double >::type y2(y2SEXP);
    Rcpp::traits::input_parameter< const double >::type oddsRatioH0(oddsRatioH0SEXP);
    rcpp_result_gen = Rcpp::wrap(remlOddsRatio(n1, y1, n2, y2, oddsRatioH0));
    return rcpp_result_gen;
END_RCPP
}
// zstatOddsRatio
double zstatOddsRatio(const std::vector<double>& n1, const std::vector<double>& y1, const std::vector<double>& n2, const std::vector<double>& y2, const double oddsRatioH0);
RcppExport SEXP _lrstat_zstatOddsRatio(SEXP n1SEXP, SEXP y1SEXP, SEXP n2SEXP, SEXP y2SEXP, SEXP oddsRatioH0SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type n1(n1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y1(y1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type n2(n2SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y2(y2SEXP);
    Rcpp::traits::input_parameter< const double >::type oddsRatioH0(oddsRatioH0SEXP);
    rcpp_result_gen = Rcpp::wrap(zstatOddsRatio(n1, y1, n2, y2, oddsRatioH0));
    return rcpp_result_gen;
END_RCPP
}
// mnOddsRatioCI
Rcpp::DataFrame mnOddsRatioCI(const std::vector<double>& n1, const std::vector<double>& y1, const std::vector<double>& n2, const std::vector<double>& y2, const double cilevel);
RcppExport SEXP _lrstat_mnOddsRatioCI(SEXP n1SEXP, SEXP y1SEXP, SEXP n2SEXP, SEXP y2SEXP, SEXP cilevelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type n1(n1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y1(y1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type n2(n2SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y2(y2SEXP);
    Rcpp::traits::input_parameter< const double >::type cilevel(cilevelSEXP);
    rcpp_result_gen = Rcpp::wrap(mnOddsRatioCI(n1, y1, n2, y2, cilevel));
    return rcpp_result_gen;
END_RCPP
}
// remlRateDiff
std::vector<double> remlRateDiff(const double t1, const double y1, const double t2, const double y2, const double rateDiffH0);
RcppExport SEXP _lrstat_remlRateDiff(SEXP t1SEXP, SEXP y1SEXP, SEXP t2SEXP, SEXP y2SEXP, SEXP rateDiffH0SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type t1(t1SEXP);
    Rcpp::traits::input_parameter< const double >::type y1(y1SEXP);
    Rcpp::traits::input_parameter< const double >::type t2(t2SEXP);
    Rcpp::traits::input_parameter< const double >::type y2(y2SEXP);
    Rcpp::traits::input_parameter< const double >::type rateDiffH0(rateDiffH0SEXP);
    rcpp_result_gen = Rcpp::wrap(remlRateDiff(t1, y1, t2, y2, rateDiffH0));
    return rcpp_result_gen;
END_RCPP
}
// zstatRateDiff
double zstatRateDiff(const std::vector<double>& t1, const std::vector<double>& y1, const std::vector<double>& t2, const std::vector<double>& y2, const double rateDiffH0);
RcppExport SEXP _lrstat_zstatRateDiff(SEXP t1SEXP, SEXP y1SEXP, SEXP t2SEXP, SEXP y2SEXP, SEXP rateDiffH0SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type t1(t1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y1(y1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type t2(t2SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y2(y2SEXP);
    Rcpp::traits::input_parameter< const double >::type rateDiffH0(rateDiffH0SEXP);
    rcpp_result_gen = Rcpp::wrap(zstatRateDiff(t1, y1, t2, y2, rateDiffH0));
    return rcpp_result_gen;
END_RCPP
}
// mnRateDiffCI
Rcpp::DataFrame mnRateDiffCI(const std::vector<double>& t1, const std::vector<double>& y1, const std::vector<double>& t2, const std::vector<double>& y2, const double cilevel);
RcppExport SEXP _lrstat_mnRateDiffCI(SEXP t1SEXP, SEXP y1SEXP, SEXP t2SEXP, SEXP y2SEXP, SEXP cilevelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type t1(t1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y1(y1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type t2(t2SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y2(y2SEXP);
    Rcpp::traits::input_parameter< const double >::type cilevel(cilevelSEXP);
    rcpp_result_gen = Rcpp::wrap(mnRateDiffCI(t1, y1, t2, y2, cilevel));
    return rcpp_result_gen;
END_RCPP
}
// remlRateRatio
std::vector<double> remlRateRatio(const double t1, const double y1, const double t2, const double y2, const double rateRatioH0);
RcppExport SEXP _lrstat_remlRateRatio(SEXP t1SEXP, SEXP y1SEXP, SEXP t2SEXP, SEXP y2SEXP, SEXP rateRatioH0SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type t1(t1SEXP);
    Rcpp::traits::input_parameter< const double >::type y1(y1SEXP);
    Rcpp::traits::input_parameter< const double >::type t2(t2SEXP);
    Rcpp::traits::input_parameter< const double >::type y2(y2SEXP);
    Rcpp::traits::input_parameter< const double >::type rateRatioH0(rateRatioH0SEXP);
    rcpp_result_gen = Rcpp::wrap(remlRateRatio(t1, y1, t2, y2, rateRatioH0));
    return rcpp_result_gen;
END_RCPP
}
// zstatRateRatio
double zstatRateRatio(const std::vector<double>& t1, const std::vector<double>& y1, const std::vector<double>& t2, const std::vector<double>& y2, const double rateRatioH0);
RcppExport SEXP _lrstat_zstatRateRatio(SEXP t1SEXP, SEXP y1SEXP, SEXP t2SEXP, SEXP y2SEXP, SEXP rateRatioH0SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type t1(t1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y1(y1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type t2(t2SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y2(y2SEXP);
    Rcpp::traits::input_parameter< const double >::type rateRatioH0(rateRatioH0SEXP);
    rcpp_result_gen = Rcpp::wrap(zstatRateRatio(t1, y1, t2, y2, rateRatioH0));
    return rcpp_result_gen;
END_RCPP
}
// mnRateRatioCI
Rcpp::DataFrame mnRateRatioCI(const std::vector<double>& t1, const std::vector<double>& y1, const std::vector<double>& t2, const std::vector<double>& y2, const double cilevel);
RcppExport SEXP _lrstat_mnRateRatioCI(SEXP t1SEXP, SEXP y1SEXP, SEXP t2SEXP, SEXP y2SEXP, SEXP cilevelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type t1(t1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y1(y1SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type t2(t2SEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type y2(y2SEXP);
    Rcpp::traits::input_parameter< const double >::type cilevel(cilevelSEXP);
    rcpp_result_gen = Rcpp::wrap(mnRateRatioCI(t1, y1, t2, y2, cilevel));
    return rcpp_result_gen;
END_RCPP
}
// updateGraph
Rcpp::List updateGraph(const Rcpp::NumericVector& w, const Rcpp::NumericMatrix& G, const Rcpp::IntegerVector& I, const int j);
RcppExport SEXP _lrstat_updateGraph(SEXP wSEXP, SEXP GSEXP, SEXP ISEXP, SEXP jSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type G(GSEXP);
    Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type I(ISEXP);
    Rcpp::traits::input_parameter< const int >::type j(jSEXP);
    rcpp_result_gen = Rcpp::wrap(updateGraph(w, G, I, j));
    return rcpp_result_gen;
END_RCPP
}
// fadjpboncpp
Rcpp::NumericMatrix fadjpboncpp(const Rcpp::NumericVector& w, const Rcpp::NumericMatrix& G, const Rcpp::NumericMatrix& p);
RcppExport SEXP _lrstat_fadjpboncpp(SEXP wSEXP, SEXP GSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type G(GSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(fadjpboncpp(w, G, p));
    return rcpp_result_gen;
END_RCPP
}
// fwgtmat
Rcpp::NumericMatrix fwgtmat(const Rcpp::NumericVector& w, const Rcpp::NumericMatrix& G);
RcppExport SEXP _lrstat_fwgtmat(SEXP wSEXP, SEXP GSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type G(GSEXP);
    rcpp_result_gen = Rcpp::wrap(fwgtmat(w, G));
    return rcpp_result_gen;
END_RCPP
}
// fadjpsimcpp
Rcpp::NumericMatrix fadjpsimcpp(const Rcpp::NumericMatrix& wgtmat, const Rcpp::NumericMatrix& p, const Rcpp::LogicalMatrix& family);
RcppExport SEXP _lrstat_fadjpsimcpp(SEXP wgtmatSEXP, SEXP pSEXP, SEXP familySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type wgtmat(wgtmatSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type p(pSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalMatrix& >::type family(familySEXP);
    rcpp_result_gen = Rcpp::wrap(fadjpsimcpp(wgtmat, p, family));
    return rcpp_result_gen;
END_RCPP
}
// repeatedPValuecpp
Rcpp::NumericMatrix repeatedPValuecpp(const int kMax, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const double maxInformation, const Rcpp::NumericMatrix& p, const Rcpp::NumericMatrix& information, const Rcpp::NumericMatrix& spendingTime);
RcppExport SEXP _lrstat_repeatedPValuecpp(SEXP kMaxSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP maxInformationSEXP, SEXP pSEXP, SEXP informationSEXP, SEXP spendingTimeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type maxInformation(maxInformationSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type p(pSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type information(informationSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type spendingTime(spendingTimeSEXP);
    rcpp_result_gen = Rcpp::wrap(repeatedPValuecpp(kMax, typeAlphaSpending, parameterAlphaSpending, maxInformation, p, information, spendingTime));
    return rcpp_result_gen;
END_RCPP
}
// fseqboncpp
Rcpp::IntegerMatrix fseqboncpp(const Rcpp::NumericVector& w, const Rcpp::NumericMatrix& G, const double alpha, const int kMax, const Rcpp::StringVector& typeAlphaSpending, const Rcpp::NumericVector& parameterAlphaSpending, const Rcpp::NumericVector& maxInformation, const Rcpp::LogicalMatrix& incidenceMatrix, const int k1, const Rcpp::NumericMatrix& p, const Rcpp::NumericMatrix& information, const Rcpp::NumericMatrix& spendingTime);
RcppExport SEXP _lrstat_fseqboncpp(SEXP wSEXP, SEXP GSEXP, SEXP alphaSEXP, SEXP kMaxSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP maxInformationSEXP, SEXP incidenceMatrixSEXP, SEXP k1SEXP, SEXP pSEXP, SEXP informationSEXP, SEXP spendingTimeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type G(GSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::StringVector& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type maxInformation(maxInformationSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalMatrix& >::type incidenceMatrix(incidenceMatrixSEXP);
    Rcpp::traits::input_parameter< const int >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type p(pSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type information(informationSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type spendingTime(spendingTimeSEXP);
    rcpp_result_gen = Rcpp::wrap(fseqboncpp(w, G, alpha, kMax, typeAlphaSpending, parameterAlphaSpending, maxInformation, incidenceMatrix, k1, p, information, spendingTime));
    return rcpp_result_gen;
END_RCPP
}
// fstp2seqcpp
Rcpp::NumericMatrix fstp2seqcpp(const Rcpp::NumericMatrix& p, const Rcpp::NumericVector& gamma, const std::string& test, const bool retest);
RcppExport SEXP _lrstat_fstp2seqcpp(SEXP pSEXP, SEXP gammaSEXP, SEXP testSEXP, SEXP retestSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type p(pSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma(gammaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type test(testSEXP);
    Rcpp::traits::input_parameter< const bool >::type retest(retestSEXP);
    rcpp_result_gen = Rcpp::wrap(fstp2seqcpp(p, gamma, test, retest));
    return rcpp_result_gen;
END_RCPP
}
// fstdmixcpp
Rcpp::NumericMatrix fstdmixcpp(const Rcpp::NumericMatrix& p, const Rcpp::LogicalMatrix& family, const Rcpp::LogicalMatrix& serial, const Rcpp::LogicalMatrix& parallel, const Rcpp::NumericVector& gamma, const std::string& test, const bool exhaust);
RcppExport SEXP _lrstat_fstdmixcpp(SEXP pSEXP, SEXP familySEXP, SEXP serialSEXP, SEXP parallelSEXP, SEXP gammaSEXP, SEXP testSEXP, SEXP exhaustSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type p(pSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalMatrix& >::type family(familySEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalMatrix& >::type serial(serialSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalMatrix& >::type parallel(parallelSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma(gammaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type test(testSEXP);
    Rcpp::traits::input_parameter< const bool >::type exhaust(exhaustSEXP);
    rcpp_result_gen = Rcpp::wrap(fstdmixcpp(p, family, serial, parallel, gamma, test, exhaust));
    return rcpp_result_gen;
END_RCPP
}
// fmodmixcpp
Rcpp::NumericMatrix fmodmixcpp(const Rcpp::NumericMatrix& p, const Rcpp::LogicalMatrix& family, const Rcpp::LogicalMatrix& serial, const Rcpp::LogicalMatrix& parallel, const Rcpp::NumericVector& gamma, const std::string& test, const bool exhaust);
RcppExport SEXP _lrstat_fmodmixcpp(SEXP pSEXP, SEXP familySEXP, SEXP serialSEXP, SEXP parallelSEXP, SEXP gammaSEXP, SEXP testSEXP, SEXP exhaustSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type p(pSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalMatrix& >::type family(familySEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalMatrix& >::type serial(serialSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalMatrix& >::type parallel(parallelSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma(gammaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type test(testSEXP);
    Rcpp::traits::input_parameter< const bool >::type exhaust(exhaustSEXP);
    rcpp_result_gen = Rcpp::wrap(fmodmixcpp(p, family, serial, parallel, gamma, test, exhaust));
    return rcpp_result_gen;
END_RCPP
}
// ftrunccpp
Rcpp::NumericMatrix ftrunccpp(const Rcpp::NumericMatrix& p, const std::string& test, const double gamma);
RcppExport SEXP _lrstat_ftrunccpp(SEXP pSEXP, SEXP testSEXP, SEXP gammaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type p(pSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type test(testSEXP);
    Rcpp::traits::input_parameter< const double >::type gamma(gammaSEXP);
    rcpp_result_gen = Rcpp::wrap(ftrunccpp(p, test, gamma));
    return rcpp_result_gen;
END_RCPP
}
// pmvnormRcpp
Rcpp::List pmvnormRcpp(const std::vector<double>& lower, const std::vector<double>& upper, const std::vector<double>& mean, const Rcpp::NumericMatrix& sigma, size_t n0, size_t n_max, size_t R, double abseps, double releps, uint64_t seed, bool parallel);
RcppExport SEXP _lrstat_pmvnormRcpp(SEXP lowerSEXP, SEXP upperSEXP, SEXP meanSEXP, SEXP sigmaSEXP, SEXP n0SEXP, SEXP n_maxSEXP, SEXP RSEXP, SEXP absepsSEXP, SEXP relepsSEXP, SEXP seedSEXP, SEXP parallelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type lower(lowerSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type upper(upperSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type mean(meanSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type sigma(sigmaSEXP);
    Rcpp::traits::input_parameter< size_t >::type n0(n0SEXP);
    Rcpp::traits::input_parameter< size_t >::type n_max(n_maxSEXP);
    Rcpp::traits::input_parameter< size_t >::type R(RSEXP);
    Rcpp::traits::input_parameter< double >::type abseps(absepsSEXP);
    Rcpp::traits::input_parameter< double >::type releps(relepsSEXP);
    Rcpp::traits::input_parameter< uint64_t >::type seed(seedSEXP);
    Rcpp::traits::input_parameter< bool >::type parallel(parallelSEXP);
    rcpp_result_gen = Rcpp::wrap(pmvnormRcpp(lower, upper, mean, sigma, n0, n_max, R, abseps, releps, seed, parallel));
    return rcpp_result_gen;
END_RCPP
}
// qmvnormRcpp
double qmvnormRcpp(const double p, const std::vector<double>& mean, const Rcpp::NumericMatrix& sigma, size_t n0, size_t n_max, size_t R, double abseps, double releps, uint64_t seed, bool parallel);
RcppExport SEXP _lrstat_qmvnormRcpp(SEXP pSEXP, SEXP meanSEXP, SEXP sigmaSEXP, SEXP n0SEXP, SEXP n_maxSEXP, SEXP RSEXP, SEXP absepsSEXP, SEXP relepsSEXP, SEXP seedSEXP, SEXP parallelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type p(pSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type mean(meanSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type sigma(sigmaSEXP);
    Rcpp::traits::input_parameter< size_t >::type n0(n0SEXP);
    Rcpp::traits::input_parameter< size_t >::type n_max(n_maxSEXP);
    Rcpp::traits::input_parameter< size_t >::type R(RSEXP);
    Rcpp::traits::input_parameter< double >::type abseps(absepsSEXP);
    Rcpp::traits::input_parameter< double >::type releps(relepsSEXP);
    Rcpp::traits::input_parameter< uint64_t >::type seed(seedSEXP);
    Rcpp::traits::input_parameter< bool >::type parallel(parallelSEXP);
    rcpp_result_gen = Rcpp::wrap(qmvnormRcpp(p, mean, sigma, n0, n_max, R, abseps, releps, seed, parallel));
    return rcpp_result_gen;
END_RCPP
}
// nbstat
Rcpp::List nbstat(const Rcpp::NumericVector& time, const double rateRatioH0, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& kappa1, const Rcpp::NumericVector& kappa2, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const double accrualDuration, const double followupTime, const bool fixedFollowup, const bool nullVariance);
RcppExport SEXP _lrstat_nbstat(SEXP timeSEXP, SEXP rateRatioH0SEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP kappa1SEXP, SEXP kappa2SEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP nullVarianceSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const double >::type rateRatioH0(rateRatioH0SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type kappa1(kappa1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type kappa2(kappa2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const bool >::type nullVariance(nullVarianceSEXP);
    rcpp_result_gen = Rcpp::wrap(nbstat(time, rateRatioH0, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, kappa1, kappa2, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup, nullVariance));
    return rcpp_result_gen;
END_RCPP
}
// nbpower
Rcpp::List nbpower(const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityRateRatio, const std::string& typeBetaSpending, const double parameterBetaSpending, const double rateRatioH0, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& kappa1, const Rcpp::NumericVector& kappa2, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const double accrualDuration, const double followupTime, const bool fixedFollowup, const Rcpp::NumericVector& spendingTime, const double studyDuration, const bool nullVariance);
RcppExport SEXP _lrstat_nbpower(SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityRateRatioSEXP, SEXP typeBetaSpendingSEXP, SEXP parameterBetaSpendingSEXP, SEXP rateRatioH0SEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP kappa1SEXP, SEXP kappa2SEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP spendingTimeSEXP, SEXP studyDurationSEXP, SEXP nullVarianceSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityRateRatio(futilityRateRatioSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpending(typeBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpending(parameterBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type rateRatioH0(rateRatioH0SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type kappa1(kappa1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type kappa2(kappa2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const double >::type studyDuration(studyDurationSEXP);
    Rcpp::traits::input_parameter< const bool >::type nullVariance(nullVarianceSEXP);
    rcpp_result_gen = Rcpp::wrap(nbpower(kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityRateRatio, typeBetaSpending, parameterBetaSpending, rateRatioH0, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, kappa1, kappa2, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup, spendingTime, studyDuration, nullVariance));
    return rcpp_result_gen;
END_RCPP
}
// nbsamplesize
Rcpp::List nbsamplesize(const double beta, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityRateRatio, const std::string& typeBetaSpending, const double parameterBetaSpending, const Rcpp::NumericVector& userBetaSpending, const double rateRatioH0, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& kappa1, const Rcpp::NumericVector& kappa2, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, double accrualDuration, double followupTime, const bool fixedFollowup, const Rcpp::NumericVector& spendingTime, const bool rounding, const bool nullVariance);
RcppExport SEXP _lrstat_nbsamplesize(SEXP betaSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityRateRatioSEXP, SEXP typeBetaSpendingSEXP, SEXP parameterBetaSpendingSEXP, SEXP userBetaSpendingSEXP, SEXP rateRatioH0SEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP kappa1SEXP, SEXP kappa2SEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP spendingTimeSEXP, SEXP roundingSEXP, SEXP nullVarianceSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityRateRatio(futilityRateRatioSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpending(typeBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpending(parameterBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userBetaSpending(userBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type rateRatioH0(rateRatioH0SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type kappa1(kappa1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type kappa2(kappa2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type rounding(roundingSEXP);
    Rcpp::traits::input_parameter< const bool >::type nullVariance(nullVarianceSEXP);
    rcpp_result_gen = Rcpp::wrap(nbsamplesize(beta, kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityRateRatio, typeBetaSpending, parameterBetaSpending, userBetaSpending, rateRatioH0, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, kappa1, kappa2, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup, spendingTime, rounding, nullVariance));
    return rcpp_result_gen;
END_RCPP
}
// nbpower1s
Rcpp::List nbpower1s(const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityRate, const std::string& typeBetaSpending, const double parameterBetaSpending, const double lambdaH0, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& kappa, const Rcpp::NumericVector& lambda, const Rcpp::NumericVector& gamma, const double accrualDuration, const double followupTime, const bool fixedFollowup, const Rcpp::NumericVector& spendingTime, const double studyDuration);
RcppExport SEXP _lrstat_nbpower1s(SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityRateSEXP, SEXP typeBetaSpendingSEXP, SEXP parameterBetaSpendingSEXP, SEXP lambdaH0SEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP kappaSEXP, SEXP lambdaSEXP, SEXP gammaSEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP spendingTimeSEXP, SEXP studyDurationSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityRate(futilityRateSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpending(typeBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpending(parameterBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type lambdaH0(lambdaH0SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type kappa(kappaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma(gammaSEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const double >::type studyDuration(studyDurationSEXP);
    rcpp_result_gen = Rcpp::wrap(nbpower1s(kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityRate, typeBetaSpending, parameterBetaSpending, lambdaH0, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, kappa, lambda, gamma, accrualDuration, followupTime, fixedFollowup, spendingTime, studyDuration));
    return rcpp_result_gen;
END_RCPP
}
// nbsamplesize1s
Rcpp::List nbsamplesize1s(const double beta, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityRate, const std::string& typeBetaSpending, const double parameterBetaSpending, const Rcpp::NumericVector& userBetaSpending, const double lambdaH0, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& kappa, const Rcpp::NumericVector& lambda, const Rcpp::NumericVector& gamma, double accrualDuration, double followupTime, const bool fixedFollowup, const Rcpp::NumericVector& spendingTime, const bool rounding);
RcppExport SEXP _lrstat_nbsamplesize1s(SEXP betaSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityRateSEXP, SEXP typeBetaSpendingSEXP, SEXP parameterBetaSpendingSEXP, SEXP userBetaSpendingSEXP, SEXP lambdaH0SEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP kappaSEXP, SEXP lambdaSEXP, SEXP gammaSEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP spendingTimeSEXP, SEXP roundingSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityRate(futilityRateSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpending(typeBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpending(parameterBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userBetaSpending(userBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type lambdaH0(lambdaH0SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type kappa(kappaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma(gammaSEXP);
    Rcpp::traits::input_parameter< double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type rounding(roundingSEXP);
    rcpp_result_gen = Rcpp::wrap(nbsamplesize1s(beta, kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityRate, typeBetaSpending, parameterBetaSpending, userBetaSpending, lambdaH0, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, kappa, lambda, gamma, accrualDuration, followupTime, fixedFollowup, spendingTime, rounding));
    return rcpp_result_gen;
END_RCPP
}
// nbpowerequiv
Rcpp::List nbpowerequiv(const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const double rateRatioLower, const double rateRatioUpper, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& kappa1, const Rcpp::NumericVector& kappa2, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const double accrualDuration, const double followupTime, const bool fixedFollowup, const Rcpp::NumericVector& spendingTime, const double studyDuration);
RcppExport SEXP _lrstat_nbpowerequiv(SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP rateRatioLowerSEXP, SEXP rateRatioUpperSEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP kappa1SEXP, SEXP kappa2SEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP spendingTimeSEXP, SEXP studyDurationSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type rateRatioLower(rateRatioLowerSEXP);
    Rcpp::traits::input_parameter< const double >::type rateRatioUpper(rateRatioUpperSEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type kappa1(kappa1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type kappa2(kappa2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const double >::type studyDuration(studyDurationSEXP);
    rcpp_result_gen = Rcpp::wrap(nbpowerequiv(kMax, informationRates, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, rateRatioLower, rateRatioUpper, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, kappa1, kappa2, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup, spendingTime, studyDuration));
    return rcpp_result_gen;
END_RCPP
}
// nbsamplesizeequiv
Rcpp::List nbsamplesizeequiv(const double beta, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const double rateRatioLower, const double rateRatioUpper, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& kappa1, const Rcpp::NumericVector& kappa2, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, double accrualDuration, double followupTime, const bool fixedFollowup, const Rcpp::NumericVector& spendingTime, const bool rounding);
RcppExport SEXP _lrstat_nbsamplesizeequiv(SEXP betaSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP rateRatioLowerSEXP, SEXP rateRatioUpperSEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP kappa1SEXP, SEXP kappa2SEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP spendingTimeSEXP, SEXP roundingSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type rateRatioLower(rateRatioLowerSEXP);
    Rcpp::traits::input_parameter< const double >::type rateRatioUpper(rateRatioUpperSEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type kappa1(kappa1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type kappa2(kappa2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type rounding(roundingSEXP);
    rcpp_result_gen = Rcpp::wrap(nbsamplesizeequiv(beta, kMax, informationRates, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, rateRatioLower, rateRatioUpper, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, kappa1, kappa2, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup, spendingTime, rounding));
    return rcpp_result_gen;
END_RCPP
}
// rmst
double rmst(const double t1, const double t2, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& lambda);
RcppExport SEXP _lrstat_rmst(SEXP t1SEXP, SEXP t2SEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP lambdaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type t1(t1SEXP);
    Rcpp::traits::input_parameter< const double >::type t2(t2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda(lambdaSEXP);
    rcpp_result_gen = Rcpp::wrap(rmst(t1, t2, piecewiseSurvivalTime, lambda));
    return rcpp_result_gen;
END_RCPP
}
// covrmst
Rcpp::NumericVector covrmst(const double t2, const double tau1, const double tau2, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const double accrualDuration, const double maxFollowupTime);
RcppExport SEXP _lrstat_covrmst(SEXP t2SEXP, SEXP tau1SEXP, SEXP tau2SEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP maxFollowupTimeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type t2(t2SEXP);
    Rcpp::traits::input_parameter< const double >::type tau1(tau1SEXP);
    Rcpp::traits::input_parameter< const double >::type tau2(tau2SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< const double >::type maxFollowupTime(maxFollowupTimeSEXP);
    rcpp_result_gen = Rcpp::wrap(covrmst(t2, tau1, tau2, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, lambda1, lambda2, gamma1, gamma2, accrualDuration, maxFollowupTime));
    return rcpp_result_gen;
END_RCPP
}
// rmstat
Rcpp::DataFrame rmstat(const Rcpp::NumericVector& time, const double milestone, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const double accrualDuration, const double followupTime, const bool fixedFollowup);
RcppExport SEXP _lrstat_rmstat(SEXP timeSEXP, SEXP milestoneSEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const double >::type milestone(milestoneSEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    rcpp_result_gen = Rcpp::wrap(rmstat(time, milestone, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup));
    return rcpp_result_gen;
END_RCPP
}
// rmpower
Rcpp::List rmpower(const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityRmstDiff, const std::string& typeBetaSpending, const double parameterBetaSpending, const double milestone, const double rmstDiffH0, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const double accrualDuration, const double followupTime, const bool fixedFollowup, const Rcpp::NumericVector& spendingTime, const double studyDuration);
RcppExport SEXP _lrstat_rmpower(SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityRmstDiffSEXP, SEXP typeBetaSpendingSEXP, SEXP parameterBetaSpendingSEXP, SEXP milestoneSEXP, SEXP rmstDiffH0SEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP spendingTimeSEXP, SEXP studyDurationSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityRmstDiff(futilityRmstDiffSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpending(typeBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpending(parameterBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type milestone(milestoneSEXP);
    Rcpp::traits::input_parameter< const double >::type rmstDiffH0(rmstDiffH0SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const double >::type studyDuration(studyDurationSEXP);
    rcpp_result_gen = Rcpp::wrap(rmpower(kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityRmstDiff, typeBetaSpending, parameterBetaSpending, milestone, rmstDiffH0, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup, spendingTime, studyDuration));
    return rcpp_result_gen;
END_RCPP
}
// rmsamplesize
Rcpp::List rmsamplesize(const double beta, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityRmstDiff, const std::string& typeBetaSpending, const double parameterBetaSpending, const Rcpp::NumericVector& userBetaSpending, const double milestone, const double rmstDiffH0, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, double accrualDuration, double followupTime, const bool fixedFollowup, const Rcpp::NumericVector& spendingTime, const bool rounding);
RcppExport SEXP _lrstat_rmsamplesize(SEXP betaSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityRmstDiffSEXP, SEXP typeBetaSpendingSEXP, SEXP parameterBetaSpendingSEXP, SEXP userBetaSpendingSEXP, SEXP milestoneSEXP, SEXP rmstDiffH0SEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP spendingTimeSEXP, SEXP roundingSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityRmstDiff(futilityRmstDiffSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpending(typeBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpending(parameterBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userBetaSpending(userBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type milestone(milestoneSEXP);
    Rcpp::traits::input_parameter< const double >::type rmstDiffH0(rmstDiffH0SEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type rounding(roundingSEXP);
    rcpp_result_gen = Rcpp::wrap(rmsamplesize(beta, kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityRmstDiff, typeBetaSpending, parameterBetaSpending, userBetaSpending, milestone, rmstDiffH0, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup, spendingTime, rounding));
    return rcpp_result_gen;
END_RCPP
}
// rmpower1s
Rcpp::List rmpower1s(const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityRmst, const std::string& typeBetaSpending, const double parameterBetaSpending, const double milestone, const double rmstH0, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda, const Rcpp::NumericVector& gamma, const double accrualDuration, const double followupTime, const bool fixedFollowup, const Rcpp::NumericVector& spendingTime, const double studyDuration);
RcppExport SEXP _lrstat_rmpower1s(SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityRmstSEXP, SEXP typeBetaSpendingSEXP, SEXP parameterBetaSpendingSEXP, SEXP milestoneSEXP, SEXP rmstH0SEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambdaSEXP, SEXP gammaSEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP spendingTimeSEXP, SEXP studyDurationSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityRmst(futilityRmstSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpending(typeBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpending(parameterBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type milestone(milestoneSEXP);
    Rcpp::traits::input_parameter< const double >::type rmstH0(rmstH0SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma(gammaSEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const double >::type studyDuration(studyDurationSEXP);
    rcpp_result_gen = Rcpp::wrap(rmpower1s(kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityRmst, typeBetaSpending, parameterBetaSpending, milestone, rmstH0, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda, gamma, accrualDuration, followupTime, fixedFollowup, spendingTime, studyDuration));
    return rcpp_result_gen;
END_RCPP
}
// rmsamplesize1s
Rcpp::List rmsamplesize1s(const double beta, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityRmst, const std::string& typeBetaSpending, const double parameterBetaSpending, const Rcpp::NumericVector& userBetaSpending, const double milestone, const double rmstH0, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda, const Rcpp::NumericVector& gamma, double accrualDuration, double followupTime, const bool fixedFollowup, const Rcpp::NumericVector& spendingTime, const bool rounding);
RcppExport SEXP _lrstat_rmsamplesize1s(SEXP betaSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityRmstSEXP, SEXP typeBetaSpendingSEXP, SEXP parameterBetaSpendingSEXP, SEXP userBetaSpendingSEXP, SEXP milestoneSEXP, SEXP rmstH0SEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambdaSEXP, SEXP gammaSEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP spendingTimeSEXP, SEXP roundingSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityRmst(futilityRmstSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpending(typeBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpending(parameterBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userBetaSpending(userBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type milestone(milestoneSEXP);
    Rcpp::traits::input_parameter< const double >::type rmstH0(rmstH0SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma(gammaSEXP);
    Rcpp::traits::input_parameter< double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type rounding(roundingSEXP);
    rcpp_result_gen = Rcpp::wrap(rmsamplesize1s(beta, kMax, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityRmst, typeBetaSpending, parameterBetaSpending, userBetaSpending, milestone, rmstH0, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda, gamma, accrualDuration, followupTime, fixedFollowup, spendingTime, rounding));
    return rcpp_result_gen;
END_RCPP
}
// rmpowerequiv
Rcpp::List rmpowerequiv(const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const double milestone, const double rmstDiffLower, const double rmstDiffUpper, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, const double accrualDuration, const double followupTime, const bool fixedFollowup, const Rcpp::NumericVector& spendingTime, const double studyDuration);
RcppExport SEXP _lrstat_rmpowerequiv(SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP milestoneSEXP, SEXP rmstDiffLowerSEXP, SEXP rmstDiffUpperSEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP spendingTimeSEXP, SEXP studyDurationSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type milestone(milestoneSEXP);
    Rcpp::traits::input_parameter< const double >::type rmstDiffLower(rmstDiffLowerSEXP);
    Rcpp::traits::input_parameter< const double >::type rmstDiffUpper(rmstDiffUpperSEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< const double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< const double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const double >::type studyDuration(studyDurationSEXP);
    rcpp_result_gen = Rcpp::wrap(rmpowerequiv(kMax, informationRates, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, milestone, rmstDiffLower, rmstDiffUpper, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup, spendingTime, studyDuration));
    return rcpp_result_gen;
END_RCPP
}
// rmsamplesizeequiv
Rcpp::List rmsamplesizeequiv(const double beta, const int kMax, const Rcpp::NumericVector& informationRates, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const double milestone, const double rmstDiffLower, const double rmstDiffUpper, const double allocationRatioPlanned, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& stratumFraction, const Rcpp::NumericVector& lambda1, const Rcpp::NumericVector& lambda2, const Rcpp::NumericVector& gamma1, const Rcpp::NumericVector& gamma2, double accrualDuration, double followupTime, const bool fixedFollowup, const Rcpp::NumericVector& spendingTime, const bool rounding);
RcppExport SEXP _lrstat_rmsamplesizeequiv(SEXP betaSEXP, SEXP kMaxSEXP, SEXP informationRatesSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP milestoneSEXP, SEXP rmstDiffLowerSEXP, SEXP rmstDiffUpperSEXP, SEXP allocationRatioPlannedSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP stratumFractionSEXP, SEXP lambda1SEXP, SEXP lambda2SEXP, SEXP gamma1SEXP, SEXP gamma2SEXP, SEXP accrualDurationSEXP, SEXP followupTimeSEXP, SEXP fixedFollowupSEXP, SEXP spendingTimeSEXP, SEXP roundingSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const int >::type kMax(kMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type milestone(milestoneSEXP);
    Rcpp::traits::input_parameter< const double >::type rmstDiffLower(rmstDiffLowerSEXP);
    Rcpp::traits::input_parameter< const double >::type rmstDiffUpper(rmstDiffUpperSEXP);
    Rcpp::traits::input_parameter< const double >::type allocationRatioPlanned(allocationRatioPlannedSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda1(lambda1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda2(lambda2SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma1(gamma1SEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type gamma2(gamma2SEXP);
    Rcpp::traits::input_parameter< double >::type accrualDuration(accrualDurationSEXP);
    Rcpp::traits::input_parameter< double >::type followupTime(followupTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixedFollowup(fixedFollowupSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type rounding(roundingSEXP);
    rcpp_result_gen = Rcpp::wrap(rmsamplesizeequiv(beta, kMax, informationRates, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, milestone, rmstDiffLower, rmstDiffUpper, allocationRatioPlanned, accrualTime, accrualIntensity, piecewiseSurvivalTime, stratumFraction, lambda1, lambda2, gamma1, gamma2, accrualDuration, followupTime, fixedFollowup, spendingTime, rounding));
    return rcpp_result_gen;
END_RCPP
}
// exitprob_seamless
Rcpp::List exitprob_seamless(const int M, const double r, const Rcpp::NumericVector& theta, const bool corr_known, const int K, SEXP b, SEXP a, SEXP I);
RcppExport SEXP _lrstat_exitprob_seamless(SEXP MSEXP, SEXP rSEXP, SEXP thetaSEXP, SEXP corr_knownSEXP, SEXP KSEXP, SEXP bSEXP, SEXP aSEXP, SEXP ISEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type M(MSEXP);
    Rcpp::traits::input_parameter< const double >::type r(rSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type theta(thetaSEXP);
    Rcpp::traits::input_parameter< const bool >::type corr_known(corr_knownSEXP);
    Rcpp::traits::input_parameter< const int >::type K(KSEXP);
    Rcpp::traits::input_parameter< SEXP >::type b(bSEXP);
    Rcpp::traits::input_parameter< SEXP >::type a(aSEXP);
    Rcpp::traits::input_parameter< SEXP >::type I(ISEXP);
    rcpp_result_gen = Rcpp::wrap(exitprob_seamless(M, r, theta, corr_known, K, b, a, I));
    return rcpp_result_gen;
END_RCPP
}
// getBound_seamless
Rcpp::NumericVector getBound_seamless(const int M, const double r, const bool corr_known, const int k, const Rcpp::NumericVector& informationRates, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::NumericVector& spendingTime, const Rcpp::LogicalVector& efficacyStopping);
RcppExport SEXP _lrstat_getBound_seamless(SEXP MSEXP, SEXP rSEXP, SEXP corr_knownSEXP, SEXP kSEXP, SEXP informationRatesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP spendingTimeSEXP, SEXP efficacyStoppingSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type M(MSEXP);
    Rcpp::traits::input_parameter< const double >::type r(rSEXP);
    Rcpp::traits::input_parameter< const bool >::type corr_known(corr_knownSEXP);
    Rcpp::traits::input_parameter< const int >::type k(kSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    rcpp_result_gen = Rcpp::wrap(getBound_seamless(M, r, corr_known, k, informationRates, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, spendingTime, efficacyStopping));
    return rcpp_result_gen;
END_RCPP
}
// getDesign_seamless
Rcpp::List getDesign_seamless(const double beta, const double IMax, const Rcpp::NumericVector& theta, const int M, const double r, const bool corr_known, const int K, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityTheta, const std::string& typeBetaSpending, const double parameterBetaSpending, const Rcpp::NumericVector& userBetaSpending, const Rcpp::NumericVector& spendingTime);
RcppExport SEXP _lrstat_getDesign_seamless(SEXP betaSEXP, SEXP IMaxSEXP, SEXP thetaSEXP, SEXP MSEXP, SEXP rSEXP, SEXP corr_knownSEXP, SEXP KSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityThetaSEXP, SEXP typeBetaSpendingSEXP, SEXP parameterBetaSpendingSEXP, SEXP userBetaSpendingSEXP, SEXP spendingTimeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const double >::type IMax(IMaxSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type theta(thetaSEXP);
    Rcpp::traits::input_parameter< const int >::type M(MSEXP);
    Rcpp::traits::input_parameter< const double >::type r(rSEXP);
    Rcpp::traits::input_parameter< const bool >::type corr_known(corr_knownSEXP);
    Rcpp::traits::input_parameter< const int >::type K(KSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityTheta(futilityThetaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpending(typeBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpending(parameterBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userBetaSpending(userBetaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    rcpp_result_gen = Rcpp::wrap(getDesign_seamless(beta, IMax, theta, M, r, corr_known, K, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityTheta, typeBetaSpending, parameterBetaSpending, userBetaSpending, spendingTime));
    return rcpp_result_gen;
END_RCPP
}
// adaptDesign_seamless
Rcpp::List adaptDesign_seamless(double betaNew, double INew, const int M, const double r, const bool corr_known, const int L, const double zL, const double theta, const double IMax, const int K, const Rcpp::NumericVector& informationRates, const Rcpp::LogicalVector& efficacyStopping, const Rcpp::LogicalVector& futilityStopping, const Rcpp::Nullable<Rcpp::NumericVector> criticalValues, const double alpha, const std::string& typeAlphaSpending, const double parameterAlphaSpending, const Rcpp::NumericVector& userAlphaSpending, const Rcpp::Nullable<Rcpp::NumericVector> futilityBounds, const Rcpp::Nullable<Rcpp::NumericVector> futilityCP, const Rcpp::Nullable<Rcpp::NumericVector> futilityTheta, const Rcpp::NumericVector& spendingTime, const bool MullerSchafer, const int kNew, const Rcpp::NumericVector& informationRatesNew, const Rcpp::LogicalVector& efficacyStoppingNew, const Rcpp::LogicalVector& futilityStoppingNew, const std::string& typeAlphaSpendingNew, const double parameterAlphaSpendingNew, const Rcpp::Nullable<Rcpp::NumericVector> futilityBoundsInt, const Rcpp::Nullable<Rcpp::NumericVector> futilityCPInt, const Rcpp::Nullable<Rcpp::NumericVector> futilityThetaInt, const std::string& typeBetaSpendingNew, const double parameterBetaSpendingNew, const Rcpp::NumericVector& userBetaSpendingNew, const Rcpp::NumericVector& spendingTimeNew);
RcppExport SEXP _lrstat_adaptDesign_seamless(SEXP betaNewSEXP, SEXP INewSEXP, SEXP MSEXP, SEXP rSEXP, SEXP corr_knownSEXP, SEXP LSEXP, SEXP zLSEXP, SEXP thetaSEXP, SEXP IMaxSEXP, SEXP KSEXP, SEXP informationRatesSEXP, SEXP efficacyStoppingSEXP, SEXP futilityStoppingSEXP, SEXP criticalValuesSEXP, SEXP alphaSEXP, SEXP typeAlphaSpendingSEXP, SEXP parameterAlphaSpendingSEXP, SEXP userAlphaSpendingSEXP, SEXP futilityBoundsSEXP, SEXP futilityCPSEXP, SEXP futilityThetaSEXP, SEXP spendingTimeSEXP, SEXP MullerSchaferSEXP, SEXP kNewSEXP, SEXP informationRatesNewSEXP, SEXP efficacyStoppingNewSEXP, SEXP futilityStoppingNewSEXP, SEXP typeAlphaSpendingNewSEXP, SEXP parameterAlphaSpendingNewSEXP, SEXP futilityBoundsIntSEXP, SEXP futilityCPIntSEXP, SEXP futilityThetaIntSEXP, SEXP typeBetaSpendingNewSEXP, SEXP parameterBetaSpendingNewSEXP, SEXP userBetaSpendingNewSEXP, SEXP spendingTimeNewSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type betaNew(betaNewSEXP);
    Rcpp::traits::input_parameter< double >::type INew(INewSEXP);
    Rcpp::traits::input_parameter< const int >::type M(MSEXP);
    Rcpp::traits::input_parameter< const double >::type r(rSEXP);
    Rcpp::traits::input_parameter< const bool >::type corr_known(corr_knownSEXP);
    Rcpp::traits::input_parameter< const int >::type L(LSEXP);
    Rcpp::traits::input_parameter< const double >::type zL(zLSEXP);
    Rcpp::traits::input_parameter< const double >::type theta(thetaSEXP);
    Rcpp::traits::input_parameter< const double >::type IMax(IMaxSEXP);
    Rcpp::traits::input_parameter< const int >::type K(KSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRates(informationRatesSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStopping(efficacyStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStopping(futilityStoppingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type criticalValues(criticalValuesSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpending(typeAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpending(parameterAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userAlphaSpending(userAlphaSpendingSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBounds(futilityBoundsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCP(futilityCPSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityTheta(futilityThetaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTime(spendingTimeSEXP);
    Rcpp::traits::input_parameter< const bool >::type MullerSchafer(MullerSchaferSEXP);
    Rcpp::traits::input_parameter< const int >::type kNew(kNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type informationRatesNew(informationRatesNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type efficacyStoppingNew(efficacyStoppingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type futilityStoppingNew(futilityStoppingNewSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeAlphaSpendingNew(typeAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterAlphaSpendingNew(parameterAlphaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityBoundsInt(futilityBoundsIntSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityCPInt(futilityCPIntSEXP);
    Rcpp::traits::input_parameter< const Rcpp::Nullable<Rcpp::NumericVector> >::type futilityThetaInt(futilityThetaIntSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type typeBetaSpendingNew(typeBetaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const double >::type parameterBetaSpendingNew(parameterBetaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type userBetaSpendingNew(userBetaSpendingNewSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type spendingTimeNew(spendingTimeNewSEXP);
    rcpp_result_gen = Rcpp::wrap(adaptDesign_seamless(betaNew, INew, M, r, corr_known, L, zL, theta, IMax, K, informationRates, efficacyStopping, futilityStopping, criticalValues, alpha, typeAlphaSpending, parameterAlphaSpending, userAlphaSpending, futilityBounds, futilityCP, futilityTheta, spendingTime, MullerSchafer, kNew, informationRatesNew, efficacyStoppingNew, futilityStoppingNew, typeAlphaSpendingNew, parameterAlphaSpendingNew, futilityBoundsInt, futilityCPInt, futilityThetaInt, typeBetaSpendingNew, parameterBetaSpendingNew, userBetaSpendingNew, spendingTimeNew));
    return rcpp_result_gen;
END_RCPP
}
// simon2stage
Rcpp::DataFrame simon2stage(const double alpha, const double beta, const double piH0, const double pi, const int n_max);
RcppExport SEXP _lrstat_simon2stage(SEXP alphaSEXP, SEXP betaSEXP, SEXP piH0SEXP, SEXP piSEXP, SEXP n_maxSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const double >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const double >::type piH0(piH0SEXP);
    Rcpp::traits::input_parameter< const double >::type pi(piSEXP);
    Rcpp::traits::input_parameter< const int >::type n_max(n_maxSEXP);
    rcpp_result_gen = Rcpp::wrap(simon2stage(alpha, beta, piH0, pi, n_max));
    return rcpp_result_gen;
END_RCPP
}
// simonBayesAnalysis
Rcpp::List simonBayesAnalysis(const int nstrata, const Rcpp::NumericVector& r, const Rcpp::NumericVector& n, const double lambda, const double gamma, const double phi, const double plo);
RcppExport SEXP _lrstat_simonBayesAnalysis(SEXP nstrataSEXP, SEXP rSEXP, SEXP nSEXP, SEXP lambdaSEXP, SEXP gammaSEXP, SEXP phiSEXP, SEXP ploSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type nstrata(nstrataSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type r(rSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type n(nSEXP);
    Rcpp::traits::input_parameter< const double >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< const double >::type gamma(gammaSEXP);
    Rcpp::traits::input_parameter< const double >::type phi(phiSEXP);
    Rcpp::traits::input_parameter< const double >::type plo(ploSEXP);
    rcpp_result_gen = Rcpp::wrap(simonBayesAnalysis(nstrata, r, n, lambda, gamma, phi, plo));
    return rcpp_result_gen;
END_RCPP
}
// simonBayesSim
Rcpp::List simonBayesSim(const Rcpp::NumericVector& p, const Rcpp::NumericVector& accrualTime, const Rcpp::NumericVector& accrualIntensity, const Rcpp::NumericVector& stratumFraction, const double lambda, const double gamma, const double phi, const double plo, const double T, const int maxSubjects, const Rcpp::IntegerVector& plannedSubjects, const int maxNumberOfIterations, const int maxNumberOfRawDatasets, const int seed);
RcppExport SEXP _lrstat_simonBayesSim(SEXP pSEXP, SEXP accrualTimeSEXP, SEXP accrualIntensitySEXP, SEXP stratumFractionSEXP, SEXP lambdaSEXP, SEXP gammaSEXP, SEXP phiSEXP, SEXP ploSEXP, SEXP TSEXP, SEXP maxSubjectsSEXP, SEXP plannedSubjectsSEXP, SEXP maxNumberOfIterationsSEXP, SEXP maxNumberOfRawDatasetsSEXP, SEXP seedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type p(pSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualTime(accrualTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type accrualIntensity(accrualIntensitySEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stratumFraction(stratumFractionSEXP);
    Rcpp::traits::input_parameter< const double >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< const double >::type gamma(gammaSEXP);
    Rcpp::traits::input_parameter< const double >::type phi(phiSEXP);
    Rcpp::traits::input_parameter< const double >::type plo(ploSEXP);
    Rcpp::traits::input_parameter< const double >::type T(TSEXP);
    Rcpp::traits::input_parameter< const int >::type maxSubjects(maxSubjectsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type plannedSubjects(plannedSubjectsSEXP);
    Rcpp::traits::input_parameter< const int >::type maxNumberOfIterations(maxNumberOfIterationsSEXP);
    Rcpp::traits::input_parameter< const int >::type maxNumberOfRawDatasets(maxNumberOfRawDatasetsSEXP);
    Rcpp::traits::input_parameter< const int >::type seed(seedSEXP);
    rcpp_result_gen = Rcpp::wrap(simonBayesSim(p, accrualTime, accrualIntensity, stratumFraction, lambda, gamma, phi, plo, T, maxSubjects, plannedSubjects, maxNumberOfIterations, maxNumberOfRawDatasets, seed));
    return rcpp_result_gen;
END_RCPP
}
// survQuantile
Rcpp::DataFrame survQuantile(const Rcpp::NumericVector& time, const Rcpp::NumericVector& event, const double cilevel, const std::string& transform, const Rcpp::NumericVector& probs);
RcppExport SEXP _lrstat_survQuantile(SEXP timeSEXP, SEXP eventSEXP, SEXP cilevelSEXP, SEXP transformSEXP, SEXP probsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type event(eventSEXP);
    Rcpp::traits::input_parameter< const double >::type cilevel(cilevelSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type transform(transformSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type probs(probsSEXP);
    rcpp_result_gen = Rcpp::wrap(survQuantile(time, event, cilevel, transform, probs));
    return rcpp_result_gen;
END_RCPP
}
// kmest
Rcpp::DataFrame kmest(const Rcpp::DataFrame& data, const Rcpp::StringVector& stratum, const std::string& time, const std::string& time2, const std::string& event, const std::string& weight, const std::string& conftype, const double conflev, const bool keep_censor);
RcppExport SEXP _lrstat_kmest(SEXP dataSEXP, SEXP stratumSEXP, SEXP timeSEXP, SEXP time2SEXP, SEXP eventSEXP, SEXP weightSEXP, SEXP conftypeSEXP, SEXP conflevSEXP, SEXP keep_censorSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type data(dataSEXP);
    Rcpp::traits::input_parameter< const Rcpp::StringVector& >::type stratum(stratumSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type time2(time2SEXP);
    Rcpp::traits::input_parameter< const std::string& >::type event(eventSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type weight(weightSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type conftype(conftypeSEXP);
    Rcpp::traits::input_parameter< const double >::type conflev(conflevSEXP);
    Rcpp::traits::input_parameter< const bool >::type keep_censor(keep_censorSEXP);
    rcpp_result_gen = Rcpp::wrap(kmest(data, stratum, time, time2, event, weight, conftype, conflev, keep_censor));
    return rcpp_result_gen;
END_RCPP
}
// kmdiff
Rcpp::DataFrame kmdiff(const Rcpp::DataFrame& data, const Rcpp::StringVector& stratum, const std::string& treat, const std::string& time, const std::string& time2, const std::string& event, const std::string& weight, const double milestone, const double survDiffH0, const double conflev);
RcppExport SEXP _lrstat_kmdiff(SEXP dataSEXP, SEXP stratumSEXP, SEXP treatSEXP, SEXP timeSEXP, SEXP time2SEXP, SEXP eventSEXP, SEXP weightSEXP, SEXP milestoneSEXP, SEXP survDiffH0SEXP, SEXP conflevSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type data(dataSEXP);
    Rcpp::traits::input_parameter< const Rcpp::StringVector& >::type stratum(stratumSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type treat(treatSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type time2(time2SEXP);
    Rcpp::traits::input_parameter< const std::string& >::type event(eventSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type weight(weightSEXP);
    Rcpp::traits::input_parameter< const double >::type milestone(milestoneSEXP);
    Rcpp::traits::input_parameter< const double >::type survDiffH0(survDiffH0SEXP);
    Rcpp::traits::input_parameter< const double >::type conflev(conflevSEXP);
    rcpp_result_gen = Rcpp::wrap(kmdiff(data, stratum, treat, time, time2, event, weight, milestone, survDiffH0, conflev));
    return rcpp_result_gen;
END_RCPP
}
// lrtest
Rcpp::DataFrame lrtest(const Rcpp::DataFrame data, const Rcpp::StringVector& stratum, const std::string& treat, const std::string& time, const std::string& time2, const std::string& event, const std::string& weight, const bool weight_readj, const double rho1, const double rho2);
RcppExport SEXP _lrstat_lrtest(SEXP dataSEXP, SEXP stratumSEXP, SEXP treatSEXP, SEXP timeSEXP, SEXP time2SEXP, SEXP eventSEXP, SEXP weightSEXP, SEXP weight_readjSEXP, SEXP rho1SEXP, SEXP rho2SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type data(dataSEXP);
    Rcpp::traits::input_parameter< const Rcpp::StringVector& >::type stratum(stratumSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type treat(treatSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type time2(time2SEXP);
    Rcpp::traits::input_parameter< const std::string& >::type event(eventSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type weight(weightSEXP);
    Rcpp::traits::input_parameter< const bool >::type weight_readj(weight_readjSEXP);
    Rcpp::traits::input_parameter< const double >::type rho1(rho1SEXP);
    Rcpp::traits::input_parameter< const double >::type rho2(rho2SEXP);
    rcpp_result_gen = Rcpp::wrap(lrtest(data, stratum, treat, time, time2, event, weight, weight_readj, rho1, rho2));
    return rcpp_result_gen;
END_RCPP
}
// rmest
Rcpp::DataFrame rmest(const Rcpp::DataFrame& data, const Rcpp::StringVector& stratum, const std::string& time, const std::string& event, const double milestone, const double conflev, const bool biascorrection);
RcppExport SEXP _lrstat_rmest(SEXP dataSEXP, SEXP stratumSEXP, SEXP timeSEXP, SEXP eventSEXP, SEXP milestoneSEXP, SEXP conflevSEXP, SEXP biascorrectionSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type data(dataSEXP);
    Rcpp::traits::input_parameter< const Rcpp::StringVector& >::type stratum(stratumSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type event(eventSEXP);
    Rcpp::traits::input_parameter< const double >::type milestone(milestoneSEXP);
    Rcpp::traits::input_parameter< const double >::type conflev(conflevSEXP);
    Rcpp::traits::input_parameter< const bool >::type biascorrection(biascorrectionSEXP);
    rcpp_result_gen = Rcpp::wrap(rmest(data, stratum, time, event, milestone, conflev, biascorrection));
    return rcpp_result_gen;
END_RCPP
}
// rmdiff
Rcpp::DataFrame rmdiff(const Rcpp::DataFrame& data, const Rcpp::StringVector& stratum, const std::string& treat, const std::string& time, const std::string& event, const double milestone, const double rmstDiffH0, const double conflev, const bool biascorrection);
RcppExport SEXP _lrstat_rmdiff(SEXP dataSEXP, SEXP stratumSEXP, SEXP treatSEXP, SEXP timeSEXP, SEXP eventSEXP, SEXP milestoneSEXP, SEXP rmstDiffH0SEXP, SEXP conflevSEXP, SEXP biascorrectionSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type data(dataSEXP);
    Rcpp::traits::input_parameter< const Rcpp::StringVector& >::type stratum(stratumSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type treat(treatSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type event(eventSEXP);
    Rcpp::traits::input_parameter< const double >::type milestone(milestoneSEXP);
    Rcpp::traits::input_parameter< const double >::type rmstDiffH0(rmstDiffH0SEXP);
    Rcpp::traits::input_parameter< const double >::type conflev(conflevSEXP);
    Rcpp::traits::input_parameter< const bool >::type biascorrection(biascorrectionSEXP);
    rcpp_result_gen = Rcpp::wrap(rmdiff(data, stratum, treat, time, event, milestone, rmstDiffH0, conflev, biascorrection));
    return rcpp_result_gen;
END_RCPP
}
// liferegRcpp
Rcpp::List liferegRcpp(const Rcpp::DataFrame& data, const std::vector<std::string>& stratum, const std::string time, const std::string time2, const std::string event, const std::vector<std::string>& covariates, const std::string weight, const std::string offset, const std::string id, const std::string dist, const std::vector<double>& init, const bool robust, const bool plci, const double alpha, const int maxiter, const double eps);
RcppExport SEXP _lrstat_liferegRcpp(SEXP dataSEXP, SEXP stratumSEXP, SEXP timeSEXP, SEXP time2SEXP, SEXP eventSEXP, SEXP covariatesSEXP, SEXP weightSEXP, SEXP offsetSEXP, SEXP idSEXP, SEXP distSEXP, SEXP initSEXP, SEXP robustSEXP, SEXP plciSEXP, SEXP alphaSEXP, SEXP maxiterSEXP, SEXP epsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type data(dataSEXP);
    Rcpp::traits::input_parameter< const std::vector<std::string>& >::type stratum(stratumSEXP);
    Rcpp::traits::input_parameter< const std::string >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const std::string >::type time2(time2SEXP);
    Rcpp::traits::input_parameter< const std::string >::type event(eventSEXP);
    Rcpp::traits::input_parameter< const std::vector<std::string>& >::type covariates(covariatesSEXP);
    Rcpp::traits::input_parameter< const std::string >::type weight(weightSEXP);
    Rcpp::traits::input_parameter< const std::string >::type offset(offsetSEXP);
    Rcpp::traits::input_parameter< const std::string >::type id(idSEXP);
    Rcpp::traits::input_parameter< const std::string >::type dist(distSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type init(initSEXP);
    Rcpp::traits::input_parameter< const bool >::type robust(robustSEXP);
    Rcpp::traits::input_parameter< const bool >::type plci(plciSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const int >::type maxiter(maxiterSEXP);
    Rcpp::traits::input_parameter< const double >::type eps(epsSEXP);
    rcpp_result_gen = Rcpp::wrap(liferegRcpp(data, stratum, time, time2, event, covariates, weight, offset, id, dist, init, robust, plci, alpha, maxiter, eps));
    return rcpp_result_gen;
END_RCPP
}
// residuals_liferegRcpp
Rcpp::NumericMatrix residuals_liferegRcpp(const std::vector<double>& beta, const Rcpp::NumericMatrix& vbeta, const Rcpp::DataFrame& data, const std::vector<std::string>& stratum, const std::string& time, const std::string& time2, const std::string& event, const std::vector<std::string>& covariates, const std::string& weight, const std::string& offset, const std::string& id, const std::string& dist, const std::string& type, const bool collapse, const bool weighted);
RcppExport SEXP _lrstat_residuals_liferegRcpp(SEXP betaSEXP, SEXP vbetaSEXP, SEXP dataSEXP, SEXP stratumSEXP, SEXP timeSEXP, SEXP time2SEXP, SEXP eventSEXP, SEXP covariatesSEXP, SEXP weightSEXP, SEXP offsetSEXP, SEXP idSEXP, SEXP distSEXP, SEXP typeSEXP, SEXP collapseSEXP, SEXP weightedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type vbeta(vbetaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type data(dataSEXP);
    Rcpp::traits::input_parameter< const std::vector<std::string>& >::type stratum(stratumSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type time2(time2SEXP);
    Rcpp::traits::input_parameter< const std::string& >::type event(eventSEXP);
    Rcpp::traits::input_parameter< const std::vector<std::string>& >::type covariates(covariatesSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type weight(weightSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type offset(offsetSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type id(idSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type dist(distSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type type(typeSEXP);
    Rcpp::traits::input_parameter< const bool >::type collapse(collapseSEXP);
    Rcpp::traits::input_parameter< const bool >::type weighted(weightedSEXP);
    rcpp_result_gen = Rcpp::wrap(residuals_liferegRcpp(beta, vbeta, data, stratum, time, time2, event, covariates, weight, offset, id, dist, type, collapse, weighted));
    return rcpp_result_gen;
END_RCPP
}
// phregRcpp
Rcpp::List phregRcpp(const Rcpp::DataFrame& data, const std::vector<std::string>& stratum, const std::string& time, const std::string& time2, const std::string& event, const std::vector<std::string>& covariates, const std::string& weight, const std::string& offset, const std::string& id, const std::string& ties, const std::vector<double>& init, const bool robust, const bool est_basehaz, const bool est_resid, const bool firth, const bool plci, const double alpha, const int maxiter, const double eps);
RcppExport SEXP _lrstat_phregRcpp(SEXP dataSEXP, SEXP stratumSEXP, SEXP timeSEXP, SEXP time2SEXP, SEXP eventSEXP, SEXP covariatesSEXP, SEXP weightSEXP, SEXP offsetSEXP, SEXP idSEXP, SEXP tiesSEXP, SEXP initSEXP, SEXP robustSEXP, SEXP est_basehazSEXP, SEXP est_residSEXP, SEXP firthSEXP, SEXP plciSEXP, SEXP alphaSEXP, SEXP maxiterSEXP, SEXP epsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type data(dataSEXP);
    Rcpp::traits::input_parameter< const std::vector<std::string>& >::type stratum(stratumSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type time2(time2SEXP);
    Rcpp::traits::input_parameter< const std::string& >::type event(eventSEXP);
    Rcpp::traits::input_parameter< const std::vector<std::string>& >::type covariates(covariatesSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type weight(weightSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type offset(offsetSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type id(idSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type ties(tiesSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type init(initSEXP);
    Rcpp::traits::input_parameter< const bool >::type robust(robustSEXP);
    Rcpp::traits::input_parameter< const bool >::type est_basehaz(est_basehazSEXP);
    Rcpp::traits::input_parameter< const bool >::type est_resid(est_residSEXP);
    Rcpp::traits::input_parameter< const bool >::type firth(firthSEXP);
    Rcpp::traits::input_parameter< const bool >::type plci(plciSEXP);
    Rcpp::traits::input_parameter< const double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const int >::type maxiter(maxiterSEXP);
    Rcpp::traits::input_parameter< const double >::type eps(epsSEXP);
    rcpp_result_gen = Rcpp::wrap(phregRcpp(data, stratum, time, time2, event, covariates, weight, offset, id, ties, init, robust, est_basehaz, est_resid, firth, plci, alpha, maxiter, eps));
    return rcpp_result_gen;
END_RCPP
}
// survfit_phregRcpp
Rcpp::DataFrame survfit_phregRcpp(const int p, const std::vector<double>& beta, const Rcpp::NumericMatrix& vbeta, const Rcpp::DataFrame& basehaz, const Rcpp::DataFrame& newdata, const std::vector<std::string>& covariates, const std::vector<std::string>& stratum, const std::string& offset, const std::string& id, const std::string& tstart, const std::string& tstop, const bool sefit, const std::string& conftype, const double conflev);
RcppExport SEXP _lrstat_survfit_phregRcpp(SEXP pSEXP, SEXP betaSEXP, SEXP vbetaSEXP, SEXP basehazSEXP, SEXP newdataSEXP, SEXP covariatesSEXP, SEXP stratumSEXP, SEXP offsetSEXP, SEXP idSEXP, SEXP tstartSEXP, SEXP tstopSEXP, SEXP sefitSEXP, SEXP conftypeSEXP, SEXP conflevSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type p(pSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type vbeta(vbetaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type basehaz(basehazSEXP);
    Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type newdata(newdataSEXP);
    Rcpp::traits::input_parameter< const std::vector<std::string>& >::type covariates(covariatesSEXP);
    Rcpp::traits::input_parameter< const std::vector<std::string>& >::type stratum(stratumSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type offset(offsetSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type id(idSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type tstart(tstartSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type tstop(tstopSEXP);
    Rcpp::traits::input_parameter< const bool >::type sefit(sefitSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type conftype(conftypeSEXP);
    Rcpp::traits::input_parameter< const double >::type conflev(conflevSEXP);
    rcpp_result_gen = Rcpp::wrap(survfit_phregRcpp(p, beta, vbeta, basehaz, newdata, covariates, stratum, offset, id, tstart, tstop, sefit, conftype, conflev));
    return rcpp_result_gen;
END_RCPP
}
// residuals_phregRcpp
Rcpp::List residuals_phregRcpp(const int p, const std::vector<double>& beta, const Rcpp::NumericMatrix& vbeta, const std::vector<double>& resmart, const Rcpp::DataFrame& data, const std::vector<std::string>& stratum, const std::string& time, const std::string& time2, const std::string& event, const std::vector<std::string>& covariates, const std::string& weight, const std::string& offset, const std::string& id, const std::string& ties, const std::string& type, const bool collapse, const bool weighted);
RcppExport SEXP _lrstat_residuals_phregRcpp(SEXP pSEXP, SEXP betaSEXP, SEXP vbetaSEXP, SEXP resmartSEXP, SEXP dataSEXP, SEXP stratumSEXP, SEXP timeSEXP, SEXP time2SEXP, SEXP eventSEXP, SEXP covariatesSEXP, SEXP weightSEXP, SEXP offsetSEXP, SEXP idSEXP, SEXP tiesSEXP, SEXP typeSEXP, SEXP collapseSEXP, SEXP weightedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type p(pSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type vbeta(vbetaSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type resmart(resmartSEXP);
    Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type data(dataSEXP);
    Rcpp::traits::input_parameter< const std::vector<std::string>& >::type stratum(stratumSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type time2(time2SEXP);
    Rcpp::traits::input_parameter< const std::string& >::type event(eventSEXP);
    Rcpp::traits::input_parameter< const std::vector<std::string>& >::type covariates(covariatesSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type weight(weightSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type offset(offsetSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type id(idSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type ties(tiesSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type type(typeSEXP);
    Rcpp::traits::input_parameter< const bool >::type collapse(collapseSEXP);
    Rcpp::traits::input_parameter< const bool >::type weighted(weightedSEXP);
    rcpp_result_gen = Rcpp::wrap(residuals_phregRcpp(p, beta, vbeta, resmart, data, stratum, time, time2, event, covariates, weight, offset, id, ties, type, collapse, weighted));
    return rcpp_result_gen;
END_RCPP
}
// assess_phregRcpp
Rcpp::List assess_phregRcpp(const int p, const std::vector<double>& beta, const Rcpp::NumericMatrix& vbeta, const Rcpp::DataFrame& data, const std::vector<std::string>& stratum, const std::string& time, const std::string& time2, const std::string& event, const std::vector<std::string>& covariates, const std::string& weight, const std::string& offset, const std::string& ties, const int resample, const std::uint32_t seed);
RcppExport SEXP _lrstat_assess_phregRcpp(SEXP pSEXP, SEXP betaSEXP, SEXP vbetaSEXP, SEXP dataSEXP, SEXP stratumSEXP, SEXP timeSEXP, SEXP time2SEXP, SEXP eventSEXP, SEXP covariatesSEXP, SEXP weightSEXP, SEXP offsetSEXP, SEXP tiesSEXP, SEXP resampleSEXP, SEXP seedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type p(pSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type vbeta(vbetaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type data(dataSEXP);
    Rcpp::traits::input_parameter< const std::vector<std::string>& >::type stratum(stratumSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type time2(time2SEXP);
    Rcpp::traits::input_parameter< const std::string& >::type event(eventSEXP);
    Rcpp::traits::input_parameter< const std::vector<std::string>& >::type covariates(covariatesSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type weight(weightSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type offset(offsetSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type ties(tiesSEXP);
    Rcpp::traits::input_parameter< const int >::type resample(resampleSEXP);
    Rcpp::traits::input_parameter< const std::uint32_t >::type seed(seedSEXP);
    rcpp_result_gen = Rcpp::wrap(assess_phregRcpp(p, beta, vbeta, data, stratum, time, time2, event, covariates, weight, offset, ties, resample, seed));
    return rcpp_result_gen;
END_RCPP
}
// zph_phregRcpp
Rcpp::List zph_phregRcpp(const int p, const std::vector<double>& beta, const Rcpp::NumericMatrix& vbeta, const std::vector<double>& resmart, const Rcpp::DataFrame& data, const std::vector<std::string>& stratum, const std::string& time, const std::string& time2, const std::string& event, const std::vector<std::string>& covariates, const std::string& weight, const std::string& offset, const std::string& ties, const std::string& transform);
RcppExport SEXP _lrstat_zph_phregRcpp(SEXP pSEXP, SEXP betaSEXP, SEXP vbetaSEXP, SEXP resmartSEXP, SEXP dataSEXP, SEXP stratumSEXP, SEXP timeSEXP, SEXP time2SEXP, SEXP eventSEXP, SEXP covariatesSEXP, SEXP weightSEXP, SEXP offsetSEXP, SEXP tiesSEXP, SEXP transformSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type p(pSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type vbeta(vbetaSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type resmart(resmartSEXP);
    Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type data(dataSEXP);
    Rcpp::traits::input_parameter< const std::vector<std::string>& >::type stratum(stratumSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type time(timeSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type time2(time2SEXP);
    Rcpp::traits::input_parameter< const std::string& >::type event(eventSEXP);
    Rcpp::traits::input_parameter< const std::vector<std::string>& >::type covariates(covariatesSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type weight(weightSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type offset(offsetSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type ties(tiesSEXP);
    Rcpp::traits::input_parameter< const std::string& >::type transform(transformSEXP);
    rcpp_result_gen = Rcpp::wrap(zph_phregRcpp(p, beta, vbeta, resmart, data, stratum, time, time2, event, covariates, weight, offset, ties, transform));
    return rcpp_result_gen;
END_RCPP
}
// pnorm_fast
double pnorm_fast(double x);
RcppExport SEXP _lrstat_pnorm_fast(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(pnorm_fast(x));
    return rcpp_result_gen;
END_RCPP
}
// qnorm_acklam
double qnorm_acklam(double p);
RcppExport SEXP _lrstat_qnorm_acklam(SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(qnorm_acklam(p));
    return rcpp_result_gen;
END_RCPP
}
// dtpwexpcpp
std::vector<double> dtpwexpcpp(const std::vector<double>& q, const std::vector<double>& piecewiseSurvivalTime, const std::vector<double>& lambda, const double lowerBound, const bool logd);
RcppExport SEXP _lrstat_dtpwexpcpp(SEXP qSEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP lambdaSEXP, SEXP lowerBoundSEXP, SEXP logdSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type q(qSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< const double >::type lowerBound(lowerBoundSEXP);
    Rcpp::traits::input_parameter< const bool >::type logd(logdSEXP);
    rcpp_result_gen = Rcpp::wrap(dtpwexpcpp(q, piecewiseSurvivalTime, lambda, lowerBound, logd));
    return rcpp_result_gen;
END_RCPP
}
// ptpwexpcpp
std::vector<double> ptpwexpcpp(const std::vector<double>& q, const std::vector<double>& piecewiseSurvivalTime, const std::vector<double>& lambda, const double lowerBound, const bool lowertail, const bool logp);
RcppExport SEXP _lrstat_ptpwexpcpp(SEXP qSEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP lambdaSEXP, SEXP lowerBoundSEXP, SEXP lowertailSEXP, SEXP logpSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type q(qSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< const double >::type lowerBound(lowerBoundSEXP);
    Rcpp::traits::input_parameter< const bool >::type lowertail(lowertailSEXP);
    Rcpp::traits::input_parameter< const bool >::type logp(logpSEXP);
    rcpp_result_gen = Rcpp::wrap(ptpwexpcpp(q, piecewiseSurvivalTime, lambda, lowerBound, lowertail, logp));
    return rcpp_result_gen;
END_RCPP
}
// qtpwexpcpp
std::vector<double> qtpwexpcpp(const std::vector<double>& p, const std::vector<double>& piecewiseSurvivalTime, const std::vector<double>& lambda, const double lowerBound, const bool lowertail, const bool logp);
RcppExport SEXP _lrstat_qtpwexpcpp(SEXP pSEXP, SEXP piecewiseSurvivalTimeSEXP, SEXP lambdaSEXP, SEXP lowerBoundSEXP, SEXP lowertailSEXP, SEXP logpSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type p(pSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< const double >::type lowerBound(lowerBoundSEXP);
    Rcpp::traits::input_parameter< const bool >::type lowertail(lowertailSEXP);
    Rcpp::traits::input_parameter< const bool >::type logp(logpSEXP);
    rcpp_result_gen = Rcpp::wrap(qtpwexpcpp(p, piecewiseSurvivalTime, lambda, lowerBound, lowertail, logp));
    return rcpp_result_gen;
END_RCPP
}
// mtpwexp
Rcpp::List mtpwexp(const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& lambda, const double lowerBound);
RcppExport SEXP _lrstat_mtpwexp(SEXP piecewiseSurvivalTimeSEXP, SEXP lambdaSEXP, SEXP lowerBoundSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< const double >::type lowerBound(lowerBoundSEXP);
    rcpp_result_gen = Rcpp::wrap(mtpwexp(piecewiseSurvivalTime, lambda, lowerBound));
    return rcpp_result_gen;
END_RCPP
}
// pbvnorm
double pbvnorm(const Rcpp::NumericVector& lower, const Rcpp::NumericVector& upper, const double rho);
RcppExport SEXP _lrstat_pbvnorm(SEXP lowerSEXP, SEXP upperSEXP, SEXP rhoSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lower(lowerSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type upper(upperSEXP);
    Rcpp::traits::input_parameter< const double >::type rho(rhoSEXP);
    rcpp_result_gen = Rcpp::wrap(pbvnorm(lower, upper, rho));
    return rcpp_result_gen;
END_RCPP
}
// hazard_pd
Rcpp::List hazard_pd(const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& hazard_pfs, const Rcpp::NumericVector& hazard_os, const double rho_pd_os);
RcppExport SEXP _lrstat_hazard_pd(SEXP piecewiseSurvivalTimeSEXP, SEXP hazard_pfsSEXP, SEXP hazard_osSEXP, SEXP rho_pd_osSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type hazard_pfs(hazard_pfsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type hazard_os(hazard_osSEXP);
    Rcpp::traits::input_parameter< const double >::type rho_pd_os(rho_pd_osSEXP);
    rcpp_result_gen = Rcpp::wrap(hazard_pd(piecewiseSurvivalTime, hazard_pfs, hazard_os, rho_pd_os));
    return rcpp_result_gen;
END_RCPP
}
// corr_pfs_os
double corr_pfs_os(const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& hazard_pfs, const Rcpp::NumericVector& hazard_os, const double rho_pd_os);
RcppExport SEXP _lrstat_corr_pfs_os(SEXP piecewiseSurvivalTimeSEXP, SEXP hazard_pfsSEXP, SEXP hazard_osSEXP, SEXP rho_pd_osSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type hazard_pfs(hazard_pfsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type hazard_os(hazard_osSEXP);
    Rcpp::traits::input_parameter< const double >::type rho_pd_os(rho_pd_osSEXP);
    rcpp_result_gen = Rcpp::wrap(corr_pfs_os(piecewiseSurvivalTime, hazard_pfs, hazard_os, rho_pd_os));
    return rcpp_result_gen;
END_RCPP
}
// hazard_sub
Rcpp::List hazard_sub(const Rcpp::NumericVector& piecewiseSurvivalTime, const Rcpp::NumericVector& hazard_itt, const Rcpp::NumericVector& hazard_pos, const double p_pos);
RcppExport SEXP _lrstat_hazard_sub(SEXP piecewiseSurvivalTimeSEXP, SEXP hazard_ittSEXP, SEXP hazard_posSEXP, SEXP p_posSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type piecewiseSurvivalTime(piecewiseSurvivalTimeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type hazard_itt(hazard_ittSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type hazard_pos(hazard_posSEXP);
    Rcpp::traits::input_parameter< const double >::type p_pos(p_posSEXP);
    rcpp_result_gen = Rcpp::wrap(hazard_sub(piecewiseSurvivalTime, hazard_itt, hazard_pos, p_pos));
    return rcpp_result_gen;
END_RCPP
}
// svdcpp
Rcpp::List svdcpp(const Rcpp::NumericMatrix& X, const bool outtransform, const bool decreasing);
RcppExport SEXP _lrstat_svdcpp(SEXP XSEXP, SEXP outtransformSEXP, SEXP decreasingSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type X(XSEXP);
    Rcpp::traits::input_parameter< const bool >::type outtransform(outtransformSEXP);
    Rcpp::traits::input_parameter< const bool >::type decreasing(decreasingSEXP);
    rcpp_result_gen = Rcpp::wrap(svdcpp(X, outtransform, decreasing));
    return rcpp_result_gen;
END_RCPP
}
// float_to_fraction
std::vector<double> float_to_fraction(const double x, const double tol);
RcppExport SEXP _lrstat_float_to_fraction(SEXP xSEXP, SEXP tolSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type x(xSEXP);
    Rcpp::traits::input_parameter< const double >::type tol(tolSEXP);
    rcpp_result_gen = Rcpp::wrap(float_to_fraction(x, tol));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_lrstat_getCP", (DL_FUNC) &_lrstat_getCP, 32},
    {"_lrstat_getCP_mams", (DL_FUNC) &_lrstat_getCP_mams, 37},
    {"_lrstat_getCP_seamless", (DL_FUNC) &_lrstat_getCP_seamless, 34},
    {"_lrstat_getCI", (DL_FUNC) &_lrstat_getCI, 10},
    {"_lrstat_getRCI", (DL_FUNC) &_lrstat_getRCI, 10},
    {"_lrstat_getADCI", (DL_FUNC) &_lrstat_getADCI, 20},
    {"_lrstat_getADRCI", (DL_FUNC) &_lrstat_getADRCI, 20},
    {"_lrstat_getCI_mams", (DL_FUNC) &_lrstat_getCI_mams, 13},
    {"_lrstat_getADCI_mams", (DL_FUNC) &_lrstat_getADCI_mams, 26},
    {"_lrstat_getCI_seamless", (DL_FUNC) &_lrstat_getCI_seamless, 13},
    {"_lrstat_getADCI_seamless", (DL_FUNC) &_lrstat_getADCI_seamless, 23},
    {"_lrstat_accrual", (DL_FUNC) &_lrstat_accrual, 4},
    {"_lrstat_getAccrualDurationFromN", (DL_FUNC) &_lrstat_getAccrualDurationFromN, 3},
    {"_lrstat_patrisk", (DL_FUNC) &_lrstat_patrisk, 4},
    {"_lrstat_pevent", (DL_FUNC) &_lrstat_pevent, 4},
    {"_lrstat_natrisk", (DL_FUNC) &_lrstat_natrisk, 12},
    {"_lrstat_nevent", (DL_FUNC) &_lrstat_nevent, 11},
    {"_lrstat_powerOnePropExact", (DL_FUNC) &_lrstat_powerOnePropExact, 4},
    {"_lrstat_samplesizeOnePropExact", (DL_FUNC) &_lrstat_samplesizeOnePropExact, 6},
    {"_lrstat_powerOneRateExact", (DL_FUNC) &_lrstat_powerOneRateExact, 5},
    {"_lrstat_samplesizeOneRateExact", (DL_FUNC) &_lrstat_samplesizeOneRateExact, 7},
    {"_lrstat_powerFisherExact", (DL_FUNC) &_lrstat_powerFisherExact, 5},
    {"_lrstat_samplesizeFisherExact", (DL_FUNC) &_lrstat_samplesizeFisherExact, 7},
    {"_lrstat_powerRiskDiffExact", (DL_FUNC) &_lrstat_powerRiskDiffExact, 7},
    {"_lrstat_samplesizeRiskDiffExact", (DL_FUNC) &_lrstat_samplesizeRiskDiffExact, 9},
    {"_lrstat_powerRiskRatioExact", (DL_FUNC) &_lrstat_powerRiskRatioExact, 7},
    {"_lrstat_samplesizeRiskRatioExact", (DL_FUNC) &_lrstat_samplesizeRiskRatioExact, 9},
    {"_lrstat_powerRiskDiffExactEquiv", (DL_FUNC) &_lrstat_powerRiskDiffExactEquiv, 8},
    {"_lrstat_samplesizeRiskDiffExactEquiv", (DL_FUNC) &_lrstat_samplesizeRiskDiffExactEquiv, 10},
    {"_lrstat_powerRiskRatioExactEquiv", (DL_FUNC) &_lrstat_powerRiskRatioExactEquiv, 8},
    {"_lrstat_samplesizeRiskRatioExactEquiv", (DL_FUNC) &_lrstat_samplesizeRiskRatioExactEquiv, 10},
    {"_lrstat_riskDiffExactPValue", (DL_FUNC) &_lrstat_riskDiffExactPValue, 6},
    {"_lrstat_riskDiffExactCI", (DL_FUNC) &_lrstat_riskDiffExactCI, 5},
    {"_lrstat_riskRatioExactPValue", (DL_FUNC) &_lrstat_riskRatioExactPValue, 6},
    {"_lrstat_riskRatioExactCI", (DL_FUNC) &_lrstat_riskRatioExactCI, 5},
    {"_lrstat_errorSpent", (DL_FUNC) &_lrstat_errorSpent, 4},
    {"_lrstat_exitprob", (DL_FUNC) &_lrstat_exitprob, 4},
    {"_lrstat_getBound", (DL_FUNC) &_lrstat_getBound, 8},
    {"_lrstat_getDesign", (DL_FUNC) &_lrstat_getDesign, 20},
    {"_lrstat_getDesignEquiv", (DL_FUNC) &_lrstat_getDesignEquiv, 13},
    {"_lrstat_adaptDesign", (DL_FUNC) &_lrstat_adaptDesign, 34},
    {"_lrstat_kmstat", (DL_FUNC) &_lrstat_kmstat, 14},
    {"_lrstat_kmpower", (DL_FUNC) &_lrstat_kmpower, 30},
    {"_lrstat_kmsamplesize", (DL_FUNC) &_lrstat_kmsamplesize, 32},
    {"_lrstat_kmpower1s", (DL_FUNC) &_lrstat_kmpower1s, 27},
    {"_lrstat_kmsamplesize1s", (DL_FUNC) &_lrstat_kmsamplesize1s, 29},
    {"_lrstat_kmpowerequiv", (DL_FUNC) &_lrstat_kmpowerequiv, 24},
    {"_lrstat_kmsamplesizeequiv", (DL_FUNC) &_lrstat_kmsamplesizeequiv, 25},
    {"_lrstat_logisregRcpp", (DL_FUNC) &_lrstat_logisregRcpp, 16},
    {"_lrstat_lrsimRcpp", (DL_FUNC) &_lrstat_lrsimRcpp, 25},
    {"_lrstat_lrsim3aRcpp", (DL_FUNC) &_lrstat_lrsim3aRcpp, 27},
    {"_lrstat_lrsim2eRcpp", (DL_FUNC) &_lrstat_lrsim2eRcpp, 29},
    {"_lrstat_lrsim2e3aRcpp", (DL_FUNC) &_lrstat_lrsim2e3aRcpp, 38},
    {"_lrstat_lrsimsubRcpp", (DL_FUNC) &_lrstat_lrsimsubRcpp, 30},
    {"_lrstat_binary_tte_simRcpp", (DL_FUNC) &_lrstat_binary_tte_simRcpp, 27},
    {"_lrstat_lrsim_mams_Rcpp", (DL_FUNC) &_lrstat_lrsim_mams_Rcpp, 22},
    {"_lrstat_lrsim_seamless_Rcpp", (DL_FUNC) &_lrstat_lrsim_seamless_Rcpp, 22},
    {"_lrstat_kmsurv", (DL_FUNC) &_lrstat_kmsurv, 7},
    {"_lrstat_lrstat", (DL_FUNC) &_lrstat_lrstat, 17},
    {"_lrstat_caltime", (DL_FUNC) &_lrstat_caltime, 13},
    {"_lrstat_getDurationFromNevents", (DL_FUNC) &_lrstat_getDurationFromNevents, 13},
    {"_lrstat_lrpower", (DL_FUNC) &_lrstat_lrpower, 32},
    {"_lrstat_getNeventsFromHazardRatio", (DL_FUNC) &_lrstat_getNeventsFromHazardRatio, 21},
    {"_lrstat_lrsamplesize", (DL_FUNC) &_lrstat_lrsamplesize, 34},
    {"_lrstat_lrpowerequiv", (DL_FUNC) &_lrstat_lrpowerequiv, 24},
    {"_lrstat_lrsamplesizeequiv", (DL_FUNC) &_lrstat_lrsamplesizeequiv, 25},
    {"_lrstat_exitprob_mams", (DL_FUNC) &_lrstat_exitprob_mams, 8},
    {"_lrstat_getBound_mams", (DL_FUNC) &_lrstat_getBound_mams, 11},
    {"_lrstat_getDesign_mams", (DL_FUNC) &_lrstat_getDesign_mams, 22},
    {"_lrstat_adaptDesign_mams", (DL_FUNC) &_lrstat_adaptDesign_mams, 39},
    {"_lrstat_remlRiskDiff", (DL_FUNC) &_lrstat_remlRiskDiff, 5},
    {"_lrstat_zstatRiskDiff", (DL_FUNC) &_lrstat_zstatRiskDiff, 5},
    {"_lrstat_mnRiskDiffCI", (DL_FUNC) &_lrstat_mnRiskDiffCI, 5},
    {"_lrstat_remlRiskRatio", (DL_FUNC) &_lrstat_remlRiskRatio, 5},
    {"_lrstat_zstatRiskRatio", (DL_FUNC) &_lrstat_zstatRiskRatio, 5},
    {"_lrstat_mnRiskRatioCI", (DL_FUNC) &_lrstat_mnRiskRatioCI, 5},
    {"_lrstat_remlOddsRatio", (DL_FUNC) &_lrstat_remlOddsRatio, 5},
    {"_lrstat_zstatOddsRatio", (DL_FUNC) &_lrstat_zstatOddsRatio, 5},
    {"_lrstat_mnOddsRatioCI", (DL_FUNC) &_lrstat_mnOddsRatioCI, 5},
    {"_lrstat_remlRateDiff", (DL_FUNC) &_lrstat_remlRateDiff, 5},
    {"_lrstat_zstatRateDiff", (DL_FUNC) &_lrstat_zstatRateDiff, 5},
    {"_lrstat_mnRateDiffCI", (DL_FUNC) &_lrstat_mnRateDiffCI, 5},
    {"_lrstat_remlRateRatio", (DL_FUNC) &_lrstat_remlRateRatio, 5},
    {"_lrstat_zstatRateRatio", (DL_FUNC) &_lrstat_zstatRateRatio, 5},
    {"_lrstat_mnRateRatioCI", (DL_FUNC) &_lrstat_mnRateRatioCI, 5},
    {"_lrstat_updateGraph", (DL_FUNC) &_lrstat_updateGraph, 4},
    {"_lrstat_fadjpboncpp", (DL_FUNC) &_lrstat_fadjpboncpp, 3},
    {"_lrstat_fwgtmat", (DL_FUNC) &_lrstat_fwgtmat, 2},
    {"_lrstat_fadjpsimcpp", (DL_FUNC) &_lrstat_fadjpsimcpp, 3},
    {"_lrstat_repeatedPValuecpp", (DL_FUNC) &_lrstat_repeatedPValuecpp, 7},
    {"_lrstat_fseqboncpp", (DL_FUNC) &_lrstat_fseqboncpp, 12},
    {"_lrstat_fstp2seqcpp", (DL_FUNC) &_lrstat_fstp2seqcpp, 4},
    {"_lrstat_fstdmixcpp", (DL_FUNC) &_lrstat_fstdmixcpp, 7},
    {"_lrstat_fmodmixcpp", (DL_FUNC) &_lrstat_fmodmixcpp, 7},
    {"_lrstat_ftrunccpp", (DL_FUNC) &_lrstat_ftrunccpp, 3},
    {"_lrstat_pmvnormRcpp", (DL_FUNC) &_lrstat_pmvnormRcpp, 11},
    {"_lrstat_qmvnormRcpp", (DL_FUNC) &_lrstat_qmvnormRcpp, 10},
    {"_lrstat_nbstat", (DL_FUNC) &_lrstat_nbstat, 17},
    {"_lrstat_nbpower", (DL_FUNC) &_lrstat_nbpower, 32},
    {"_lrstat_nbsamplesize", (DL_FUNC) &_lrstat_nbsamplesize, 34},
    {"_lrstat_nbpower1s", (DL_FUNC) &_lrstat_nbpower1s, 27},
    {"_lrstat_nbsamplesize1s", (DL_FUNC) &_lrstat_nbsamplesize1s, 29},
    {"_lrstat_nbpowerequiv", (DL_FUNC) &_lrstat_nbpowerequiv, 25},
    {"_lrstat_nbsamplesizeequiv", (DL_FUNC) &_lrstat_nbsamplesizeequiv, 26},
    {"_lrstat_rmst", (DL_FUNC) &_lrstat_rmst, 4},
    {"_lrstat_covrmst", (DL_FUNC) &_lrstat_covrmst, 13},
    {"_lrstat_rmstat", (DL_FUNC) &_lrstat_rmstat, 14},
    {"_lrstat_rmpower", (DL_FUNC) &_lrstat_rmpower, 30},
    {"_lrstat_rmsamplesize", (DL_FUNC) &_lrstat_rmsamplesize, 32},
    {"_lrstat_rmpower1s", (DL_FUNC) &_lrstat_rmpower1s, 27},
    {"_lrstat_rmsamplesize1s", (DL_FUNC) &_lrstat_rmsamplesize1s, 29},
    {"_lrstat_rmpowerequiv", (DL_FUNC) &_lrstat_rmpowerequiv, 24},
    {"_lrstat_rmsamplesizeequiv", (DL_FUNC) &_lrstat_rmsamplesizeequiv, 25},
    {"_lrstat_exitprob_seamless", (DL_FUNC) &_lrstat_exitprob_seamless, 8},
    {"_lrstat_getBound_seamless", (DL_FUNC) &_lrstat_getBound_seamless, 11},
    {"_lrstat_getDesign_seamless", (DL_FUNC) &_lrstat_getDesign_seamless, 22},
    {"_lrstat_adaptDesign_seamless", (DL_FUNC) &_lrstat_adaptDesign_seamless, 36},
    {"_lrstat_simon2stage", (DL_FUNC) &_lrstat_simon2stage, 5},
    {"_lrstat_simonBayesAnalysis", (DL_FUNC) &_lrstat_simonBayesAnalysis, 7},
    {"_lrstat_simonBayesSim", (DL_FUNC) &_lrstat_simonBayesSim, 14},
    {"_lrstat_survQuantile", (DL_FUNC) &_lrstat_survQuantile, 5},
    {"_lrstat_kmest", (DL_FUNC) &_lrstat_kmest, 9},
    {"_lrstat_kmdiff", (DL_FUNC) &_lrstat_kmdiff, 10},
    {"_lrstat_lrtest", (DL_FUNC) &_lrstat_lrtest, 10},
    {"_lrstat_rmest", (DL_FUNC) &_lrstat_rmest, 7},
    {"_lrstat_rmdiff", (DL_FUNC) &_lrstat_rmdiff, 9},
    {"_lrstat_liferegRcpp", (DL_FUNC) &_lrstat_liferegRcpp, 16},
    {"_lrstat_residuals_liferegRcpp", (DL_FUNC) &_lrstat_residuals_liferegRcpp, 15},
    {"_lrstat_phregRcpp", (DL_FUNC) &_lrstat_phregRcpp, 19},
    {"_lrstat_survfit_phregRcpp", (DL_FUNC) &_lrstat_survfit_phregRcpp, 14},
    {"_lrstat_residuals_phregRcpp", (DL_FUNC) &_lrstat_residuals_phregRcpp, 17},
    {"_lrstat_assess_phregRcpp", (DL_FUNC) &_lrstat_assess_phregRcpp, 14},
    {"_lrstat_zph_phregRcpp", (DL_FUNC) &_lrstat_zph_phregRcpp, 14},
    {"_lrstat_pnorm_fast", (DL_FUNC) &_lrstat_pnorm_fast, 1},
    {"_lrstat_qnorm_acklam", (DL_FUNC) &_lrstat_qnorm_acklam, 1},
    {"_lrstat_dtpwexpcpp", (DL_FUNC) &_lrstat_dtpwexpcpp, 5},
    {"_lrstat_ptpwexpcpp", (DL_FUNC) &_lrstat_ptpwexpcpp, 6},
    {"_lrstat_qtpwexpcpp", (DL_FUNC) &_lrstat_qtpwexpcpp, 6},
    {"_lrstat_mtpwexp", (DL_FUNC) &_lrstat_mtpwexp, 3},
    {"_lrstat_pbvnorm", (DL_FUNC) &_lrstat_pbvnorm, 3},
    {"_lrstat_hazard_pd", (DL_FUNC) &_lrstat_hazard_pd, 4},
    {"_lrstat_corr_pfs_os", (DL_FUNC) &_lrstat_corr_pfs_os, 4},
    {"_lrstat_hazard_sub", (DL_FUNC) &_lrstat_hazard_sub, 4},
    {"_lrstat_svdcpp", (DL_FUNC) &_lrstat_svdcpp, 3},
    {"_lrstat_float_to_fraction", (DL_FUNC) &_lrstat_float_to_fraction, 2},
    {NULL, NULL, 0}
};

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