Compute projections of full predictors on to subspace of predictors
lm_proj(x, fit, sigma2, indproj, is.logistic)
x
: Design matrix.fit
: Matrix of fitted values for the full model.sigma2
: Residual variance (1 for logistic regression).indproj
: Vector of indices of the columns of x
that form the projection subspace.is.logistic
: Set to TRUE
for a logistic regression model.