choose.next: Next variable to enter the current submodel

View source: R/projection.R

choose.nextR Documentation

Next variable to enter the current submodel

Description

Return the index of the variable that should be added to the current model according to the smallest KL-divergence (linear regression) or the largest score test (logistic regression).

Usage

choose.next(x, sigma2, fit, fitp, chosen, is.logistic)

Arguments

x

Design matrix.

sigma2

Residual variance (1 for logistic regression).

fit

Matrix of fitted values for the full model.

fitp

Matrix of fitted values for the projected model.

chosen

Vector of indices of the columns of x in the current submodel.

is.logistic

Set to TRUE for a logistic regression model.


hsstan documentation built on June 22, 2024, 12:19 p.m.