| subsetBIC | R Documentation |
Computes a BIC-like criterion for a chromosome that encodes a variable subset. The same expression
\mathrm{BIC} = n \log(\mathrm{rss\_like}/n) + k \log n
is used for all families, where:
For Gaussian with identity link, rss_like is the residual sum of squares (RSS),
computed via a fast .lm.fit.
For other GLM families, rss_like is the residual deviance
from glm.fit.
The effective parameter count k includes the intercept.
subsetBIC(
subset_bin,
y,
X,
family = stats::gaussian(),
weights = NULL,
offset = NULL,
control = stats::glm.control()
)
subset_bin |
Integer/numeric 0–1 vector (length |
y |
Numeric response vector of length |
X |
Numeric matrix of candidate predictors; columns correspond to variables. |
family |
A GLM family object (default |
weights |
Optional prior weights (passed to |
offset |
Optional offset (passed to |
control |
GLM fit controls; default |
The chromosome subset_bin is a binary vector (0/1 by column),
indicating which predictors from X are included. The design matrix
always includes an intercept. Rank-deficient selections return Inf
(which the GA maximizer treats as a very poor score). The value returned is
-BIC so that GA engines can maximize it.
A single numeric value: -BIC. Larger is better for GA maximizers.
Returns Inf for rank-deficient designs.
glm.fit, glm.control,
.lm.fit
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.