R/RcppExports.R

Defines functions .sc_cpp_rootmatrix_cross .sc_cpp_rootmatrix .sc_cpp_recresid .sc_cpp_fstats .sc_cpp_efp_process_re .sc_cpp_efp_process_me .sc_cpp_construct_rss_table .sc_cpp_extend_rss_table .sc_cpp_rss .sc_cpp_rssi

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

.sc_cpp_rssi <- function(y, X, n, i, intercept_only, tol, rcond_min) {
    .Call('_strucchangeRcpp_sc_cpp_rssi', PACKAGE = 'strucchangeRcpp', y, X, n, i, intercept_only, tol, rcond_min)
}

.sc_cpp_rss <- function(rss_triang, i, j) {
    .Call('_strucchangeRcpp_sc_cpp_rss', PACKAGE = 'strucchangeRcpp', rss_triang, i, j)
}

.sc_cpp_extend_rss_table <- function(rss_table, rss_triang, n, h, breaks) {
    .Call('_strucchangeRcpp_sc_cpp_extend_rss_table', PACKAGE = 'strucchangeRcpp', rss_table, rss_triang, n, h, breaks)
}

#' ..
#' @param 
#' @param 
#' @param
#' @param 
#' @return 
.sc_cpp_construct_rss_table <- function(y, X, n, h, breaks, intercept_only, tol, rcond_min) {
    .Call('_strucchangeRcpp_sc_cpp_construct_rss_table', PACKAGE = 'strucchangeRcpp', y, X, n, h, breaks, intercept_only, tol, rcond_min)
}

#' Computes the empirical fluctuation process according to moving OLS estimates (type ME) 
#' @param X design matrix
#' @param y response vector
#' @param rescale boolean argument defining whether or not the estimates will be standardized
#' @param h bandwith of the process
#' @return square root of X
.sc_cpp_efp_process_me <- function(X, y, rescale, h) {
    .Call('_strucchangeRcpp_sc_cpp_efp_process_me', PACKAGE = 'strucchangeRcpp', X, y, rescale, h)
}

#' Computes the empirical fluctuation process according to recursive OLS estimates (type RE) 
#' @param X design matrix
#' @param y response vector
#' @param rescale boolean argument defining whether or not the estimates will be standardized
#' @param h bandwith of the process
#' @return square root of X
.sc_cpp_efp_process_re <- function(X, y, rescale) {
    .Call('_strucchangeRcpp_sc_cpp_efp_process_re', PACKAGE = 'strucchangeRcpp', X, y, rescale)
}

#' Compute F statistics for a data window
#' @param X design matrix
#' @param y response vector
#' @param istart window start index (1-based, as in R)
#' @param iend window end index (1-based, as in R)
#' @param rcond_min minimum reciprocal conditioning number to use armadillo::solve
#' @return list with elements stats and sume2 where stats is a vector with F statistics and sume2 is the sum of squared residuals of the model using all data
.sc_cpp_fstats <- function(X, y, istart, iend, rcond_min) {
    .Call('_strucchangeRcpp_sc_cpp_fstats', PACKAGE = 'strucchangeRcpp', X, y, istart, iend, rcond_min)
}

#' Computation of recursive residuals in C++
#' @param X design matrix
#' @param y response vector
#' @param start integer (1-based) index of the first observation to compute recursive residuals
#' @param end integer (1-based) index of the last observation to compute recursive residuals
#' @param tol tolerance in the computation of recursive model coefficients
#' @return vector containing the recursive residuals 
#' @seealso \code{\link{recresid}} and \code{\link{recresid.default}}
NULL

#' Computation of recursive residuals in C++
#' @param X design matrix
#' @param y response vector
#' @param start integer (1-based) index of the first observation to compute recursive residuals
#' @param end integer (1-based) index of the last observation to compute recursive residuals
#' @param tol tolerance in the computation of recursive model coefficients
#' @return vector containing the recursive residuals 
#' @seealso \code{\link{recresid}} and \code{\link{recresid.default}}
.sc_cpp_recresid <- function(X, y, start, end, tol, rcond_min) {
    .Call('_strucchangeRcpp_sc_cpp_recresid', PACKAGE = 'strucchangeRcpp', X, y, start, end, tol, rcond_min)
}

#' Computes the square root of a symetric positive definite matrix
#' @param X symetric positive definite matrix
#' @return square root of X
.sc_cpp_rootmatrix <- function(X) {
    .Call('_strucchangeRcpp_sc_cpp_rootmatrix', PACKAGE = 'strucchangeRcpp', X)
}

#' Computes the square root of the Gramian matrix t(X) %*% X
#' @param X a matrix
#' @return square root of t(X) %*% X
.sc_cpp_rootmatrix_cross <- function(X) {
    .Call('_strucchangeRcpp_sc_cpp_rootmatrix_cross', PACKAGE = 'strucchangeRcpp', X)
}

Try the strucchangeRcpp package in your browser

Any scripts or data that you put into this service are public.

strucchangeRcpp documentation built on Nov. 26, 2021, 5:28 p.m.