update_logreg_coeffs: LR Update Function

Description Usage Arguments Value

View source: R/RcppExports.R

Description

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.

Usage

1
2
3
4
5
6
7
8
9
update_logreg_coeffs(
  model,
  responsemat,
  coeffmat,
  Xb,
  fitted,
  cols_to_update,
  padding_zeros = 0L
)

Arguments

model

- model matrix.

responsemat

matrix of response vectors in columns.

coeffmat

initial coefficient matrix.

Xb

matrix of linear predictors, one column for each response.

fitted

matrix of fitted probabilities.

cols_to_update

vector of zeros and ones (doubles) indicating which columns to update.

padding_zeros

integer number of padding zeros to add to the response and predictors to update.

Value

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.


CCGill/LRpadding documentation built on May 11, 2020, 12:21 a.m.