R/RcppExports.R

Defines functions psv_cpp pse_cpp cov2cor_cpp vcv_loop which2 pglmm_gaussian_internal_cpp pglmm_gaussian_LL_calc_cpp pglmm_gaussian_LL_cpp pglmm_gaussian_predict sexp_type pglmm_internal_cpp pglmm_LL_cpp pglmm_V pglmm_iV_logdetV_cpp pcd2_loop predict_cpp set_seed organize_boots one_boot_cpp cor_phylo_cpp cor_phylo_LL

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

cor_phylo_LL <- function(par, XX, UU, MM, Vphy, tau, REML, constrain_d, lower_d, verbose, rcond_threshold) {
    .Call(`_phyr_cor_phylo_LL`, par, XX, UU, MM, Vphy, tau, REML, constrain_d, lower_d, verbose, rcond_threshold)
}

#' Inner function to create necessary matrices and do model fitting.
#' 
#' @param X a n x p matrix with p columns containing the values for the n taxa.
#' @param U a list of p matrices corresponding to the p columns of `X`, with each 
#'   matrix containing independent variables for the corresponding column of `X`.
#' @param M a n x p matrix with p columns containing standard errors of the trait 
#'   values in `X`. 
#' @param Vphy_ phylogenetic variance-covariance matrix from the input phylogeny.
#' @inheritParams cor_phylo
#' @param method the `method` input to `cor_phylo`.
#' 
#' @return a list containing output information, to later be coerced to a 
#'   `cor_phylo` object by the `cor_phylo` function.
#' @noRd
#' @name cor_phylo_cpp
#' 
cor_phylo_cpp <- function(X, U, M, Vphy, REML, constrain_d, lower_d, verbose, rcond_threshold, rel_tol, max_iter, method, no_corr, sann) {
    .Call(`_phyr_cor_phylo_cpp`, X, U, M, Vphy, REML, constrain_d, lower_d, verbose, rcond_threshold, rel_tol, max_iter, method, no_corr, sann)
}

#' Inner function to do one bootstrapping rep.
#' 
#' The arguments before `X` are needed in this function but not in
#' `cor_phylo_cpp`, while the arguments starting at `X` are all those required
#' in `cor_phylo_cpp`.
#'
#' @noRd
#' 
one_boot_cpp <- function(rnd_vec, min_par, B, d, keep_boots, X, U, M, Vphy, REML, constrain_d, lower_d, verbose, rcond_threshold, rel_tol, max_iter, method, no_corr, sann) {
    .Call(`_phyr_one_boot_cpp`, rnd_vec, min_par, B, d, keep_boots, X, U, M, Vphy, REML, constrain_d, lower_d, verbose, rcond_threshold, rel_tol, max_iter, method, no_corr, sann)
}

organize_boots <- function(orig_list) {
    .Call(`_phyr_organize_boots`, orig_list)
}

set_seed <- function(seed) {
    invisible(.Call(`_phyr_set_seed`, seed))
}

predict_cpp <- function(n, nsr, reps, V) {
    .Call(`_phyr_predict_cpp`, n, nsr, reps, V)
}

pcd2_loop <- function(SSii, nsr, SCii, comm, V, nsp_pool, verbose) {
    .Call(`_phyr_pcd2_loop`, SSii, nsr, SCii, comm, V, nsp_pool, verbose)
}

pglmm_iV_logdetV_cpp <- function(par, mu, Zt, St, nested, logdet, family, totalSize) {
    .Call(`_phyr_pglmm_iV_logdetV_cpp`, par, mu, Zt, St, nested, logdet, family, totalSize)
}

pglmm_V <- function(par, Zt, St, mu, nested, missing_mu, family, totalSize) {
    .Call(`_phyr_pglmm_V`, par, Zt, St, mu, nested, missing_mu, family, totalSize)
}

pglmm_LL_cpp <- function(par, H, X, Zt, St, mu, nested, REML, verbose, family, totalSize) {
    .Call(`_phyr_pglmm_LL_cpp`, par, H, X, Zt, St, mu, nested, REML, verbose, family, totalSize)
}

pglmm_internal_cpp <- function(X, Y, Zt, St, nested, REML, verbose, n, p, q, maxit, reltol, tol_pql, maxit_pql, optimizer, B_init, ss, family, totalSize) {
    .Call(`_phyr_pglmm_internal_cpp`, X, Y, Zt, St, nested, REML, verbose, n, p, q, maxit, reltol, tol_pql, maxit_pql, optimizer, B_init, ss, family, totalSize)
}

sexp_type <- function(x) {
    .Call(`_phyr_sexp_type`, x)
}

pglmm_gaussian_predict <- function(iV, H) {
    .Call(`_phyr_pglmm_gaussian_predict`, iV, H)
}

pglmm_gaussian_LL_cpp <- function(par, X, Y, Zt, St, nested, REML, verbose) {
    .Call(`_phyr_pglmm_gaussian_LL_cpp`, par, X, Y, Zt, St, nested, REML, verbose)
}

pglmm_gaussian_LL_calc_cpp <- function(par, X, Y, Zt, St, nested, REML) {
    .Call(`_phyr_pglmm_gaussian_LL_calc_cpp`, par, X, Y, Zt, St, nested, REML)
}

pglmm_gaussian_internal_cpp <- function(par, X, Y, Zt, St, nested, REML, verbose, optimizer, maxit, reltol, q, n, p, Pi) {
    .Call(`_phyr_pglmm_gaussian_internal_cpp`, par, X, Y, Zt, St, nested, REML, verbose, optimizer, maxit, reltol, q, n, p, Pi)
}

which2 <- function(x) {
    .Call(`_phyr_which2`, x)
}

vcv_loop <- function(xx, n, e1, e2, EL, pp, corr) {
    .Call(`_phyr_vcv_loop`, xx, n, e1, e2, EL, pp, corr)
}

cov2cor_cpp <- function(vcv) {
    invisible(.Call(`_phyr_cov2cor_cpp`, vcv))
}

pse_cpp <- function(comm, Cmatrix) {
    .Call(`_phyr_pse_cpp`, comm, Cmatrix)
}

psv_cpp <- function(comm, Cmatrix, compute_var) {
    .Call(`_phyr_psv_cpp`, comm, Cmatrix, compute_var)
}
daijiang/phyr documentation built on Feb. 25, 2024, 3:01 a.m.