R/RcppExports.R

Defines functions smat ordgee mat_minus mat_add fixmod cmat alphpow

Documented in alphpow cmat fixmod ordgee smat

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

#' @name alphpow
#' @title constrct matrix of powers of x
NULL

#' @param x a numeric value
#' @param mat a matrix
#' @return matrix of powers of x
NULL

#' @name cmat
#' @title obtain the matrix of within cluster correlation
NULL

#' @param ctimes a numeric vector of time points
#' @param alpha the association parameter
#' @param corrmod a character string specifying the working correlation structure
#' @param diffmeth a character string specifying the method used for estimation of alpha
#' @param h a numeric value of finite differencing
#' @return the matrix of within cluster correlation and its derivatives
NULL

alphpow <- function(x, mat) {
    .Call(`_cpmgee_alphpow`, x, mat)
}

cmat <- function(ctimes, alpha, corrmod, diffmeth, h) {
    .Call(`_cpmgee_cmat`, ctimes, alpha, corrmod, diffmeth, h)
}

#' @name fixmod
#' @title model information
NULL

#' @param mod a fitted model
#' @param coeffs a numeric vector of coefficients
#' @param X the design matrix
#' @return a list of information of the model
NULL

fixmod <- function(mod, coeffs, X) {
    .Call(`_cpmgee_fixmod`, mod, coeffs, X)
}

#' @name mad_add
#' @title matrix addition
#' @param a a matrix
#' @param b a matrix
#' @return a matrix
NULL

#' @name mad_minus
#' @title matrix subtraction
#' @param a a matrix
#' @param b a matrix
#' @return a matrix
NULL

mat_add <- function(a, b) {
    .Call(`_cpmgee_mat_add`, a, b)
}

mat_minus <- function(a, b) {
    .Call(`_cpmgee_mat_minus`, a, b)
}

#' @name ordgee
#' @title update beta
NULL

#' @param mod a fitted model
#' @param icormat a list of working correlation matrices
#' @param X the design matrix
#' @param ctimes a numeric vector of time points
#' @param categories a numeric variable indicating the number of ordinal levels
#' @param omaxit a numeric value of maximum iteration
#' @param otal a numeric value of tolerance for convergence
#' @return a list of information of the model including the updated beta
NULL

ordgee <- function(mod, icormat, X, ctimes, categories, omaxit, otol) {
    .Call(`_cpmgee_ordgee`, mod, icormat, X, ctimes, categories, omaxit, otol)
}

#' @name smat
#' @title obtain a matrix of correlations among elements in Z_{it}
NULL

#' @param coeff a numeric vector of intercept and regression coefficients
#' @return a matrix and its inverse
NULL

smat <- function(coeff) {
    .Call(`_cpmgee_smat`, coeff)
}
YuqiTian35/cpmgee documentation built on Aug. 6, 2023, 4:30 a.m.