diff --git a/.Rbuildignore b/.Rbuildignore index ca23174..2e4ba37 100755 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -12,3 +12,4 @@ ^LICENSE\.md$ TODO.md ^\.github$ +^CRAN-SUBMISSION$ diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION new file mode 100644 index 0000000..98bf3c1 --- /dev/null +++ b/CRAN-SUBMISSION @@ -0,0 +1,3 @@ +Version: 0.1.1 +Date: 2022-08-26 15:40:19 UTC +SHA: a7eb4f1af54665ef1c659ca66b1a3b9dacd34b97 diff --git a/DESCRIPTION b/DESCRIPTION index f5e96a0..806c7dc 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: goffda Type: Package Title: Goodness-of-Fit Tests for Functional Data -Version: 0.1.0 -Date: 2021-08-19 +Version: 0.1.1 +Date: 2022-08-26 Authors@R: c( person(given = "Eduardo", family = "García-Portugués", role = c("aut", "cre"), email = "edgarcia@est-econ.uc3m.es", @@ -39,5 +39,5 @@ LinkingTo: Rcpp, RcppArmadillo URL: https://github.com/egarpor/goffda BugReports: https://github.com/egarpor/goffda Encoding: UTF-8 -RoxygenNote: 7.1.1 +RoxygenNote: 7.2.0 Roxygen: list(old_usage = TRUE) diff --git a/NEWS.md b/NEWS.md index ee531a7..7573a5a 100755 --- a/NEWS.md +++ b/NEWS.md @@ -19,3 +19,7 @@ * Support forthcoming `Rcpp`'s STRICT_R_HEADERS. * Update bibliographical details for main reference. * Rename `r_gof2019_flmfr` to `r_gof2021_flmfr`. + +# goffda 0.1.1 + +* Fix in HTML version of manual. diff --git a/R/RcppExports.R b/R/RcppExports.R index d2b0c8d..25ba08b 100644 --- a/R/RcppExports.R +++ b/R/RcppExports.R @@ -14,13 +14,12 @@ #' expansion, such as Functional Principal Components (FPC). #' #' The PCvM statistic is defined as -#' \deqn{\mathrm{PCvM}_{n,p,q} = -#' c \cdot \mathrm{tr}(\hat\mathbf{E}_q' \mathbf{A}_\bullet \hat\mathbf{E}_q)}{ -#' PCvM_{n, p, q} = c * tr(\hat E_q' A_\bullet \hat E_q) -#' } +#' \deqn{\mathrm{PCvM}_{n,p,q} = c \cdot \mathrm{tr}(\hat{\mathbf{E}}_q' +#' \mathbf{A}_\bullet \hat{\mathbf{E}}_q)}{PCvM_{n, p, q} = +#' c * tr(\hat E_q' A_\bullet \hat E_q)} #' where #' \deqn{c = 2 \pi^{(p + q) / 2 - 1} / (q \Gamma(p / 2) \Gamma(q / 2) n^2),} -#' \eqn{\hat\mathbf{E}_q}{\hat E_q} is the \eqn{n \times q}{n x q} +#' \eqn{\hat{\mathbf{E}}_q}{\hat E_q} is the \eqn{n \times q}{n x q} #' matrix of multivariate residuals, and #' \eqn{\mathbf{A}_\bullet}{A_\bullet} is a \eqn{n \times n}{n x n} #' matrix whose \eqn{ij}-th element is diff --git a/R/data.R b/R/data.R index 160d4e0..2ab91ee 100755 --- a/R/data.R +++ b/R/data.R @@ -43,7 +43,7 @@ #' (2017). #' @source #' The dataset comes from the companion data to Benatia et al. (2017), which -#' was retrieved from the \href{https://davidbenatia.wordpress.com/research/}{ +#' was retrieved from the \href{https://www.davidbenatia.com/publication/}{ #' first author's website}. The source of the electricity consumption data is #' the \href{https://www.ieso.ca/}{System operator's website}. The source #' of the preprocessed temperature values is the diff --git a/R/flm_est.R b/R/flm_est.R index 356e788..0910774 100755 --- a/R/flm_est.R +++ b/R/flm_est.R @@ -67,7 +67,7 @@ #' \code{cv_nlambda} or \code{cv_parallel}, among others. #' @return A list with the following entries: #' \item{Beta_hat}{estimated \eqn{\beta}, a matrix with values -#' \eqn{\hat\beta (s, t)} evaluated at the grid points for \code{X} +#' \eqn{\hat\beta(s, t)} evaluated at the grid points for \code{X} #' and \code{Y}. Its size is \code{c(length(X$argvals), length(Y$argvals))}.} #' \item{Beta_hat_scores}{the matrix of coefficients of \code{Beta_hat} #' (resulting from projecting it into the tensor basis of \code{X_fpc} and diff --git a/R/scenarios-fr.R b/R/scenarios-fr.R index 3c255e8..5dded8d 100755 --- a/R/scenarios-fr.R +++ b/R/scenarios-fr.R @@ -754,6 +754,7 @@ r_gof2021_flmfr <- function(n, s = seq(0, 1, len = 101), #' the same grid as \code{error_fdata}, with the same length as #' \code{length(X_fdata$argvals)}. #' @inheritParams quadrature +#' @param t grid points where responses are valued. #' @inheritParams elem-flmfr #' @return Functional linear model term as the integral (in \code{s}) between #' \code{X_fdata} and \code{beta}, as an \code{\link[fda.usc]{fdata}} object of diff --git a/man/flm_est.Rd b/man/flm_est.Rd index 5646a7d..0ccd8e9 100755 --- a/man/flm_est.Rd +++ b/man/flm_est.Rd @@ -65,7 +65,7 @@ Defaults to \code{"trapezoid"}.} \value{ A list with the following entries: \item{Beta_hat}{estimated \eqn{\beta}, a matrix with values -\eqn{\hat\beta (s, t)} evaluated at the grid points for \code{X} +\eqn{\hat\beta(s, t)} evaluated at the grid points for \code{X} and \code{Y}. Its size is \code{c(length(X$argvals), length(Y$argvals))}.} \item{Beta_hat_scores}{the matrix of coefficients of \code{Beta_hat} (resulting from projecting it into the tensor basis of \code{X_fpc} and diff --git a/man/flm_stat.Rd b/man/flm_stat.Rd index 444a4b6..7c53235 100755 --- a/man/flm_stat.Rd +++ b/man/flm_stat.Rd @@ -48,13 +48,12 @@ the coefficients (scores) of the sample in a \eqn{p}-truncated basis expansion, such as Functional Principal Components (FPC). The PCvM statistic is defined as -\deqn{\mathrm{PCvM}_{n,p,q} = -c \cdot \mathrm{tr}(\hat\mathbf{E}_q' \mathbf{A}_\bullet \hat\mathbf{E}_q)}{ -PCvM_{n, p, q} = c * tr(\hat E_q' A_\bullet \hat E_q) -} +\deqn{\mathrm{PCvM}_{n,p,q} = c \cdot \mathrm{tr}(\hat{\mathbf{E}}_q' +\mathbf{A}_\bullet \hat{\mathbf{E}}_q)}{PCvM_{n, p, q} = +c * tr(\hat E_q' A_\bullet \hat E_q)} where \deqn{c = 2 \pi^{(p + q) / 2 - 1} / (q \Gamma(p / 2) \Gamma(q / 2) n^2),} -\eqn{\hat\mathbf{E}_q}{\hat E_q} is the \eqn{n \times q}{n x q} +\eqn{\hat{\mathbf{E}}_q}{\hat E_q} is the \eqn{n \times q}{n x q} matrix of multivariate residuals, and \eqn{\mathbf{A}_\bullet}{A_\bullet} is a \eqn{n \times n}{n x n} matrix whose \eqn{ij}-th element is diff --git a/man/flm_term.Rd b/man/flm_term.Rd index 301dc89..8ddaa39 100755 --- a/man/flm_term.Rd +++ b/man/flm_term.Rd @@ -17,7 +17,7 @@ for each grid point \eqn{s} in \eqn{[a, b]} and \eqn{t} in \eqn{[c, d]}. If the same grid as \code{error_fdata}, with the same length as \code{length(X_fdata$argvals)}.} -\item{t}{vectors with grid points where functions are valued.} +\item{t}{grid points where responses are valued.} \item{int_rule}{quadrature rule for approximating the definite unidimensional integral: trapezoidal rule (\code{int_rule = "trapezoid"}) diff --git a/man/ontario.Rd b/man/ontario.Rd index de69867..6eef669 100755 --- a/man/ontario.Rd +++ b/man/ontario.Rd @@ -24,7 +24,7 @@ A list with the following entries: } \source{ The dataset comes from the companion data to Benatia et al. (2017), which -was retrieved from the \href{https://davidbenatia.wordpress.com/research/}{ +was retrieved from the \href{https://www.davidbenatia.com/publication/}{ first author's website}. The source of the electricity consumption data is the \href{https://www.ieso.ca/}{System operator's website}. The source of the preprocessed temperature values is the diff --git a/src/flm_stat.cpp b/src/flm_stat.cpp index 1b6c729..55ec293 100755 --- a/src/flm_stat.cpp +++ b/src/flm_stat.cpp @@ -17,13 +17,12 @@ using namespace Rcpp; //' expansion, such as Functional Principal Components (FPC). //' //' The PCvM statistic is defined as -//' \deqn{\mathrm{PCvM}_{n,p,q} = -//' c \cdot \mathrm{tr}(\hat\mathbf{E}_q' \mathbf{A}_\bullet \hat\mathbf{E}_q)}{ -//' PCvM_{n, p, q} = c * tr(\hat E_q' A_\bullet \hat E_q) -//' } +//' \deqn{\mathrm{PCvM}_{n,p,q} = c \cdot \mathrm{tr}(\hat{\mathbf{E}}_q' +//' \mathbf{A}_\bullet \hat{\mathbf{E}}_q)}{PCvM_{n, p, q} = +//' c * tr(\hat E_q' A_\bullet \hat E_q)} //' where //' \deqn{c = 2 \pi^{(p + q) / 2 - 1} / (q \Gamma(p / 2) \Gamma(q / 2) n^2),} -//' \eqn{\hat\mathbf{E}_q}{\hat E_q} is the \eqn{n \times q}{n x q} +//' \eqn{\hat{\mathbf{E}}_q}{\hat E_q} is the \eqn{n \times q}{n x q} //' matrix of multivariate residuals, and //' \eqn{\mathbf{A}_\bullet}{A_\bullet} is a \eqn{n \times n}{n x n} //' matrix whose \eqn{ij}-th element is