From ecba28bc22f1483eea30a16ea8eca43e190cce1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Belzile?= Date: Thu, 30 Nov 2023 10:16:56 -0500 Subject: [PATCH] Release 1.16 --- DESCRIPTION | 2 +- NAMESPACE | 1 - NEWS.md | 3 +- R/RcppExports.R | 1 - R/datasets.R | 6 +-- man/dot-rexstudspec.Rd | 2 - man/kjtail.Rd | 65 ------------------------------ man/pandemics.Rd | 4 +- src/RcppExports.cpp | 90 +++++++++++++++++++++--------------------- src/sampling.cpp | 1 - 10 files changed, 52 insertions(+), 123 deletions(-) delete mode 100644 man/kjtail.Rd diff --git a/DESCRIPTION b/DESCRIPTION index ceff332..4b06596 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: mev Type: Package Title: Modelling of Extreme Values -Version: 1.15.5 +Version: 1.16 Authors@R: c(person(given="Leo", family="Belzile", role = c("aut", "cre"), email = "belzilel@gmail.com", comment = c(ORCID = "0000-0002-9135-014X")), person(given="Jennifer L.", family="Wadsworth", role=c("aut")), person(given="Paul J.", family="Northrop", role=c("aut")), person(given="Scott D.", family="Grimshaw", role=c("aut")), person(given="Jin", family="Zhang", role=c("ctb")), person(given="Michael A.", family="Stephens", role=c("ctb")), person(given="Art B.", family="Owen", role=c("ctb")), person(given="Raphael", family="Huser", role=c("aut"))) Description: Various tools for the analysis of univariate, multivariate and functional extremes. Exact simulation from max-stable processes [Dombry, Engelke and Oesting (2016) , R-Pareto processes for various parametric models, including Brown-Resnick (Wadsworth and Tawn, 2014, ) and Extremal Student (Thibaud and Opitz, 2015, ). Threshold selection methods, including Wadsworth (2016) , and Northrop and Coleman (2014) . Multivariate extreme diagnostics. Estimation and likelihoods for univariate extremes, e.g., Coles (2001) . License: GPL-3 diff --git a/NAMESPACE b/NAMESPACE index 7f998a7..ed665e3 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -152,7 +152,6 @@ export(infomat.test) export(intensBR) export(intensXstud) export(jac) -export(kjtail) export(lambdadep) export(likmgp) export(maxstabtest) diff --git a/NEWS.md b/NEWS.md index 63c607e..a24d8e1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,4 @@ -# mev 1.16 - +# mev 1.16 (Release date 2023-11-30) ## New: diff --git a/R/RcppExports.R b/R/RcppExports.R index 479f776..afe84b3 100644 --- a/R/RcppExports.R +++ b/R/RcppExports.R @@ -298,7 +298,6 @@ mvrnorm <- function(n, mu, Sigma) { #' Generates from \eqn{Q_i}{Qi}, the spectral measure of the extremal Student model #' -#' @param index index of the location. An integer in 0, ..., \eqn{d-1} #' @param sigma a positive semi-definite covariance matrix with unit variance #' @param al the alpha parameter in Proposition 7. Corresponds to degrees of freedom - 1 #' @keywords internal diff --git a/R/datasets.R b/R/datasets.R index 45e740a..a17434a 100644 --- a/R/datasets.R +++ b/R/datasets.R @@ -195,7 +195,7 @@ NULL #' Deaths from pandemics #' -#' The data base contains estimated records of the number of deaths from pandemics. +#' The data base contains estimated records of the number of deaths from pandemics. #' @format A data frame with 72 rows and 8 variables: #' \describe{ #' \item{\code{event}}{name of the event} @@ -205,8 +205,8 @@ NULL #' \item{\code{average}}{average estimated deaths (in thousands)} #' \item{\code{upper}}{upper bound on estimated deaths (in thousands)} #' \item{\code{saverage}}{scaled average of estimated deaths (in thousands)} -#' \item{\code{population}}{estimated population at risk (in thousands)} +#' \item{\code{population}}{estimated population at risk (in thousands)} #' } #' @name pandemics -#' @source Cirillo, P. and N.N. Taleb (2020). \emph{Tail risk of contagious diseases}. Nat. Phys. \bold{16}, 606–613 (2020). \url{https://doi.org/10.1038/s41567-020-0921-x} +#' @source Cirillo, P. and N.N. Taleb (2020). \emph{Tail risk of contagious diseases}. Nat. Phys. \bold{16}, 606–613 (2020). "pandemics" diff --git a/man/dot-rexstudspec.Rd b/man/dot-rexstudspec.Rd index f84ab70..f6c5e4f 100644 --- a/man/dot-rexstudspec.Rd +++ b/man/dot-rexstudspec.Rd @@ -10,8 +10,6 @@ \item{sigma}{a positive semi-definite covariance matrix with unit variance} \item{al}{the alpha parameter in Proposition 7. Corresponds to degrees of freedom - 1} - -\item{index}{index of the location. An integer in 0, ..., \eqn{d-1}} } \value{ an \code{n} by \code{d} sample from the spectral distribution diff --git a/man/kjtail.Rd b/man/kjtail.Rd deleted file mode 100644 index ce320ab..0000000 --- a/man/kjtail.Rd +++ /dev/null @@ -1,65 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/taildep2.R -\name{kjtail} -\alias{kjtail} -\title{Estimators of the tail coefficient} -\usage{ -kjtail( - data, - q, - ptail = NULL, - mqu, - type = 1, - ties.method = eval(formals(rank)$ties.method) -) -} -\arguments{ -\item{data}{a matrix of observations} - -\item{q}{vector of quantile levels} - -\item{ptail}{tail probability smaller than \code{q}. Default to \code{NULL}} - -\item{mqu}{marginal quantile levels for semiparametric estimation; data above this are modelled using a generalized Pareto distribution. If missing, empirical estimation is used throughout} - -\item{type}{integer indicating the estimator type} - -\item{ties.method}{method for ties} -} -\value{ -a list with elements -\itemize{ -\item \code{p} quantile level for estimation -\item \code{eta} estimated coefficient of tail dependence \eqn{\eta} -\item \code{eta_sd} estimated standard error of \eqn{\eta} -\item \code{k1} parameter of the tail expansion -\item \code{pat} proportion of observations above the threshold -\item \code{lambda} tail dependence coefficient (sic) -\item \code{tailprob} tail probability, if \code{ptail} is provided -} -} -\description{ -Estimators proposed by Krupskii and Joe under second order expansion -for the coefficient of tail dependence \eqn{\eta} and the -joint tail orthant probability -} -\note{ -EXPERIMENTAL. The numerical optimization of the likelihood surface is difficult, as the function is ill-behaved. Visual inspection of estimates is necessary to check for non-convergence. -} -\examples{ -d <- 2 -rho <- 0.9 -Sigma <- matrix(rho, d, d) + diag(1 - rho, d) -eta_true <- 1/sum(Sigma) -data <- mev::mvrnorm( - n = 1e4, - mu = rep(0, d), - Sigma = Sigma) -q <- seq(0.95, 0.995, by = 0.005) -taildep <- kjtail(data = data, q = q) -with(taildep, - plot(x = 1-pat, - y = eta, - ylim = c(0,1), - panel.first = {abline(h = (1+rho)/2)})) -} diff --git a/man/pandemics.Rd b/man/pandemics.Rd index 54adae1..56f3731 100644 --- a/man/pandemics.Rd +++ b/man/pandemics.Rd @@ -14,11 +14,11 @@ A data frame with 72 rows and 8 variables: \item{\code{average}}{average estimated deaths (in thousands)} \item{\code{upper}}{upper bound on estimated deaths (in thousands)} \item{\code{saverage}}{scaled average of estimated deaths (in thousands)} - \item{\code{population}}{estimated population at risk (in thousands)} + \item{\code{population}}{estimated population at risk (in thousands)} } } \source{ -Cirillo, P. and N.N. Taleb (2020). \emph{Tail risk of contagious diseases}. Nat. Phys. \bold{16}, 606–613 (2020). \url{https://doi.org/10.1038/s41567-020-0921-x} +Cirillo, P. and N.N. Taleb (2020). \emph{Tail risk of contagious diseases}. Nat. Phys. \bold{16}, 606–613 (2020). } \usage{ pandemics diff --git a/src/RcppExports.cpp b/src/RcppExports.cpp index 1253416..10109ec 100644 --- a/src/RcppExports.cpp +++ b/src/RcppExports.cpp @@ -45,7 +45,7 @@ RcppExport SEXP _mev_distg(SEXP locSEXP, SEXP scaleSEXP, SEXP rhoSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -80,7 +80,7 @@ RcppExport SEXP _mev_EuclideanWeights(SEXP xSEXP, SEXP muSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -120,7 +120,7 @@ RcppExport SEXP _mev_emplik_intern(SEXP zSEXP, SEXP muSEXP, SEXP lamSEXP, SEXP e if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -156,7 +156,7 @@ RcppExport SEXP _mev_Pickands_emp(SEXP sSEXP, SEXP angSEXP, SEXP wtsSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -190,7 +190,7 @@ RcppExport SEXP _mev_ldirfn(SEXP paramSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -227,7 +227,7 @@ RcppExport SEXP _mev_loocvdens(SEXP nuSEXP, SEXP angSEXP, SEXP wtsSEXP, SEXP loo if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -268,7 +268,7 @@ RcppExport SEXP _mev_Zhang_Stephens(SEXP xSEXP, SEXP initSEXP, SEXP adapt_sdSEXP if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -304,7 +304,7 @@ RcppExport SEXP _mev_rdir(SEXP nSEXP, SEXP alphaSEXP, SEXP normalizeSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -340,7 +340,7 @@ RcppExport SEXP _mev_mvrnorm(SEXP nSEXP, SEXP muSEXP, SEXP SigmaSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -376,7 +376,7 @@ RcppExport SEXP _mev_mvrnorm_chol(SEXP nSEXP, SEXP muSEXP, SEXP Sigma_cholSEXP) if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -413,7 +413,7 @@ RcppExport SEXP _mev_mvrnorm_arma(SEXP nSEXP, SEXP MuSEXP, SEXP XmatSEXP, SEXP e if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -449,7 +449,7 @@ RcppExport SEXP _mev_mvrnorm_chol_arma(SEXP nSEXP, SEXP MuSEXP, SEXP Chol_CovSEX if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -486,7 +486,7 @@ RcppExport SEXP _mev_mvrt(SEXP nSEXP, SEXP scaleMatSEXP, SEXP dofSEXP, SEXP locS if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -523,7 +523,7 @@ RcppExport SEXP _mev_mvrtXstud(SEXP nSEXP, SEXP sigmaSEXP, SEXP alphaSEXP, SEXP if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -560,7 +560,7 @@ RcppExport SEXP _mev_dmvnorm_arma(SEXP xSEXP, SEXP meanSEXP, SEXP sigmaSEXP, SEX if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -597,7 +597,7 @@ RcppExport SEXP _mev_dmvnorm_chol_arma(SEXP xSEXP, SEXP meanSEXP, SEXP chol_sigm if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -633,7 +633,7 @@ RcppExport SEXP _mev_rPlog(SEXP dSEXP, SEXP indexSEXP, SEXP thetaSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -669,7 +669,7 @@ RcppExport SEXP _mev_rPneglog(SEXP dSEXP, SEXP indexSEXP, SEXP thetaSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -706,7 +706,7 @@ RcppExport SEXP _mev_rPdirmix(SEXP dSEXP, SEXP indexSEXP, SEXP alphaSEXP, SEXP w if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -742,7 +742,7 @@ RcppExport SEXP _mev_rPbilog(SEXP dSEXP, SEXP indexSEXP, SEXP alphaSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -778,7 +778,7 @@ RcppExport SEXP _mev_rPexstud_old(SEXP indexSEXP, SEXP sigmaSEXP, SEXP alSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -815,7 +815,7 @@ RcppExport SEXP _mev_rPexstud(SEXP indexSEXP, SEXP choleskySEXP, SEXP sigmaSEXP, if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -851,7 +851,7 @@ RcppExport SEXP _mev_rPHuslerReiss(SEXP indexSEXP, SEXP choleskySEXP, SEXP Sigma if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -886,7 +886,7 @@ RcppExport SEXP _mev_rPHuslerReiss_old(SEXP indexSEXP, SEXP LambdaSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -922,7 +922,7 @@ RcppExport SEXP _mev_rPBrownResnick(SEXP indexSEXP, SEXP Sigma_cholSEXP, SEXP Si if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -958,7 +958,7 @@ RcppExport SEXP _mev_rPSmith(SEXP indexSEXP, SEXP Sigma_cholSEXP, SEXP locSEXP) if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -995,7 +995,7 @@ RcppExport SEXP _mev_rPdir(SEXP dSEXP, SEXP indexSEXP, SEXP alphaSEXP, SEXP irvS if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1031,7 +1031,7 @@ RcppExport SEXP _mev_rlogspec(SEXP nSEXP, SEXP dSEXP, SEXP thetaSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1067,7 +1067,7 @@ RcppExport SEXP _mev_rneglogspec(SEXP nSEXP, SEXP dSEXP, SEXP thetaSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1104,7 +1104,7 @@ RcppExport SEXP _mev_rdirmixspec(SEXP nSEXP, SEXP dSEXP, SEXP alphaSEXP, SEXP we if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1139,7 +1139,7 @@ RcppExport SEXP _mev_rbilogspec(SEXP nSEXP, SEXP alphaSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1175,7 +1175,7 @@ RcppExport SEXP _mev_rexstudspec(SEXP nSEXP, SEXP sigmaSEXP, SEXP alSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1210,7 +1210,7 @@ RcppExport SEXP _mev_rhrspec(SEXP nSEXP, SEXP LambdaSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1246,7 +1246,7 @@ RcppExport SEXP _mev_rbrspec(SEXP nSEXP, SEXP Sigma_cholSEXP, SEXP SigmaSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1282,7 +1282,7 @@ RcppExport SEXP _mev_rsmithspec(SEXP nSEXP, SEXP Sigma_cholSEXP, SEXP locSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1319,7 +1319,7 @@ RcppExport SEXP _mev_rdirspec(SEXP nSEXP, SEXP dSEXP, SEXP alphaSEXP, SEXP irvSE if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1356,7 +1356,7 @@ RcppExport SEXP _mev_rpairbetaspec(SEXP nSEXP, SEXP dSEXP, SEXP alphaSEXP, SEXP if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1393,7 +1393,7 @@ RcppExport SEXP _mev_rpairexpspec(SEXP nSEXP, SEXP dSEXP, SEXP alphaSEXP, SEXP b if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1430,7 +1430,7 @@ RcppExport SEXP _mev_rwdirbsspec(SEXP nSEXP, SEXP dSEXP, SEXP alphaSEXP, SEXP be if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1467,7 +1467,7 @@ RcppExport SEXP _mev_rwexpbsspec(SEXP nSEXP, SEXP dSEXP, SEXP alphaSEXP, SEXP be if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1506,7 +1506,7 @@ RcppExport SEXP _mev_rmevA1(SEXP nSEXP, SEXP dSEXP, SEXP parSEXP, SEXP modelSEXP if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1545,7 +1545,7 @@ RcppExport SEXP _mev_rmevA2(SEXP nSEXP, SEXP dSEXP, SEXP parSEXP, SEXP modelSEXP if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1584,7 +1584,7 @@ RcppExport SEXP _mev_rmevspec_cpp(SEXP nSEXP, SEXP dSEXP, SEXP parSEXP, SEXP mod if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1624,7 +1624,7 @@ RcppExport SEXP _mev_rmevasy(SEXP nSEXP, SEXP dSEXP, SEXP parSEXP, SEXP asymSEXP if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1664,7 +1664,7 @@ RcppExport SEXP _mev_rPsite(SEXP nSEXP, SEXP jSEXP, SEXP dSEXP, SEXP parSEXP, SE if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; diff --git a/src/sampling.cpp b/src/sampling.cpp index 6243ac6..6428412 100644 --- a/src/sampling.cpp +++ b/src/sampling.cpp @@ -693,7 +693,6 @@ NumericMatrix rbilogspec(int n, NumericVector alpha){ //' Generates from \eqn{Q_i}{Qi}, the spectral measure of the extremal Student model //' -//' @param index index of the location. An integer in 0, ..., \eqn{d-1} //' @param sigma a positive semi-definite covariance matrix with unit variance //' @param al the alpha parameter in Proposition 7. Corresponds to degrees of freedom - 1 //' @keywords internal