fit_model_q {PosiR} | R Documentation |
Fit OLS model using lm.fit (Internal Helper)
Description
Lightweight and robust wrapper around lm.fit()
for use in bootstrap procedures.
Designed to handle possible rank-deficiency gracefully by returning NA-coefficients
for linearly dependent terms. Primarily used internally within simultaneous_ci()
.
Usage
fit_model_q(X_full, y, q_indices)
Arguments
X_full |
Numeric matrix. Full design matrix including intercept if present.
Column names must be unique. Typically derived from |
y |
Numeric vector. Response variable, same length as |
q_indices |
Integer vector. Column indices (1-based) specifying the submodel to fit. |
Value
Named numeric vector of estimated coefficients. If fitting fails or coefficients are dropped due to collinearity, NA values are returned with expected names.
[Package PosiR version 0.1.2 Index]