# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' LR Update Function
#'
#' Runs Logistic Regression on each response with the model and updates the
#' coefficients, predictors, and fitted values when the log-likelihood has
#' been improved. Updates values in place.
#'
#' @param model - model matrix.
#' @param responsemat matrix of response vectors in columns.
#' @param coeffmat initial coefficient matrix.
#' @param Xb matrix of linear predictors, one column for each response.
#' @param fitted matrix of fitted probabilities.
#' @param cols_to_update vector of zeros and ones (doubles) indicating which
#' columns to update.
#' @param padding_zeros integer number of padding zeros to add to the response
#' and predictors to update.
#'
#' @return list of coefficient matrix, predictor matrix, fitted_values matrix,
#' vector of old loglikelihoods (from inputs) and vector on new log likelihoods
#' based on the returned coefficients.
#' @export
update_logreg_coeffs <- function(model, responsemat, coeffmat, Xb, fitted, cols_to_update, padding_zeros = 0L) {
invisible(.Call(`_LRpadding_update_logreg_coeffs`, model, responsemat, coeffmat, Xb, fitted, cols_to_update, padding_zeros))
}
basic_logistic_reg_ <- function(x, y) {
.Call(`_LRpadding_basic_logistic_reg_`, x, y)
}
logistic_reg_ <- function(x, y, start, eps_f, eps_g, maxit) {
.Call(`_LRpadding_logistic_reg_`, x, y, start, eps_f, eps_g, maxit)
}
basic_padding_logistic_reg_ <- function(x, y, padding = 0L) {
.Call(`_LRpadding_basic_padding_logistic_reg_`, x, y, padding)
}
padded_logistic_reg_ <- function(x, y, padding, start, eps_f, eps_g, maxit) {
.Call(`_LRpadding_padded_logistic_reg_`, x, y, padding, start, eps_f, eps_g, maxit)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.