# This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
## flm <- function(X, y) {
## .Call('fastLm', PACKAGE = 'RcppEigen', X, y, 0L)
## }
##' Regression statistics
##'
##' \code{betaHat} returns the Linear model coefficient, \code{R2}
##' returns the R-squared statistic, and \code{R2pred} returns the
##' predictive R-squared statistic
##'
##' @param X model matrix
##' @param y response vector (or matrix)
##' @rdname regressionStatistics
##' @aliases betaHat
##' @export
betaHat <- function(X, y) {
.Call('bootR2_betaHat' , PACKAGE = 'bootR2', X, y)
## if(is.matrix(y)) {
## .Call('bootR2_betaHatMat', PACKAGE = 'bootR2', X, y)
## } else {
## .Call('bootR2_betaHat' , PACKAGE = 'bootR2', X, y)
## }
}
##' @rdname regressionStatistics
##' @aliases R2
##' @export
R2 <- function(X, y) {
.Call('bootR2_R2', PACKAGE = 'bootR2', X, y)
}
##' @param Xt training model matrix
##' @param yt training response vector
##' @param Xv validation model matrix
##' @param yv validation response vector
##' @rdname regressionStatistics
##' @aliases R2pred
##' @export
R2pred <- function(Xt, yt, Xv, yv) {
.Call('bootR2_R2pred', PACKAGE = 'bootR2', Xt, yt, Xv, yv)
}
##' Uniform random number generation
##'
##' @rdname bootPerm
##' @aliases rUnif
##' @export
rUnif <- function(n) {
.Call('bootR2_rUnif', PACKAGE = 'bootR2', n)
}
##' Random permutation
##'
##' @param n length of the permutation vector
##' @return a permutation of \code{1:n}
##' @rdname bootPerm
##' @aliases shuffleMatrix shuffleVector
##' @export
bootPerm <- function(n) {
.Call('bootR2_bootPerm', PACKAGE = 'bootR2', n)
}
##' @param X model matrix to be permuted
##' @param prm permutation of the observations (typically the output
##' of \code{bootPerm}
##' @rdname bootPerm
##' @export
shuffleMatrix <- function(X, prm) {
.Call('bootR2_shuffleMatrix', PACKAGE = 'bootR2', X, prm)
}
##' @param y response vector to be permuted
##' @rdname bootPerm
##' @export
shuffleVector <- function(y, prm) {
.Call('bootR2_shuffleVector', PACKAGE = 'bootR2', y, prm)
}
##' Bootstraped linear model coefficient
##'
##' @param X model matrix
##' @param y response vector
##' @param nBoot number of bootstrap samples
##' @export
bootCoef <- function(X, y, nBoot) {
.Call('bootR2_bootCoef', PACKAGE = 'bootR2', X, y, nBoot)
}
## dev <- function(y) {
## .Call('bootR2_dev', PACKAGE = 'bootR2', y)
## }
##' @param X model matrix
##' @param y model response
##' @useDynLib bootR2
##' @exportPattern "^[[:alpha:]]+"
##' @importFrom Rcpp evalCpp
##' @rdname bootR2
##' @aliases bootR2pred bootR2samp
##' @export
bootR2pred <- function(X, y, nBoot) {
.Call('bootR2_bootR2pred', PACKAGE = 'bootR2', X, y, nBoot)
}
##' @rdname bootR2
##' @export
bootR2samp <- function(X, y, nBoot) {
.Call('bootR2_bootR2', PACKAGE = 'bootR2', X, y, nBoot)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.