LogBip: Fit a Binary Logistic Biplot

View source: R/LogBip.R

LogBipR Documentation

Fit a Binary Logistic Biplot

Description

Estimates the intercept vector \mu, the row-marker matrix A, and the column-marker matrix B of a logistic biplot model using the optimization algorithm selected by the user.

Usage

LogBip(
  x,
  k = 5,
  method = "MM",
  type = NULL,
  plot = TRUE,
  maxit = NULL,
  endsegm = 0.9,
  label.ind = FALSE,
  col.ind = NULL,
  draw = c("biplot", "ind", "var"),
  random_start = FALSE,
  L = 0,
  cv_LogBip = FALSE
)

Arguments

x

A binary matrix (or a matrix with NA values when method = "PDLB").

k

Number of dimensions. Default is k = 5.

method

Fitting algorithm. One of "MM" (default), "CG", "PDLB", or "BFGS".

type

Update formula for the conjugate gradient method: 1 = Fletcher–Reeves, 2 = Polak–Ribiere, 3 = Beale–Sorenson. Ignored for other methods.

plot

Logical; if TRUE (default), the logistic biplot is plotted after fitting.

maxit

Maximum number of iterations. Defaults to 100 for gradient methods and 500 for derivative-free methods.

endsegm

End point of the variable segment on the probability scale. The segment starts at 0.5 and ends at this value. Default is 0.90.

label.ind

Logical; if TRUE, row points are labelled. Default is FALSE.

col.ind

Color for the row markers. Passed to plotBLB.

draw

Which graph to draw: "biplot" (default) for both rows and columns, "ind" for individuals only, or "var" for variables only.

random_start

Logical; if TRUE, parameters are initialised randomly. If FALSE (default), an SVD-based initialisation is used.

L

Ridge penalization parameter. Default is L = 0 (no penalty).

cv_LogBip

Logical; indicates whether the function is being called internally by cv_LogBip. Users should leave this as FALSE (default).

Details

The following fitting methods are available:

Conjugate gradient (CG): Set method = "CG" and choose the update formula via type:

  • type = 1 — Fletcher–Reeves

  • type = 2 — Polak–Ribiere

  • type = 3 — Hestenes–Stiefel

  • type = 4 — Dai–Yuan

Coordinate descent MM: Set method = "MM" to use the iterative coordinate descent Majorization-Minimization algorithm.

Projection-based algorithm (PDLB): Set method = "PDLB" when the binary matrix contains missing values, or when the row coordinates of new (supplementary) individuals need to be estimated without refitting the model. See Babativa-Marquez & Vicente-Villardon (2022) for details.

BFGS: Set method = "BFGS" to use the Broyden–Fletcher– Goldfarb–Shanno quasi-Newton method.

Value

An object of class BiplotML (a named list) containing:

Ahat

Data frame of row-marker coordinates.

Bhat

Data frame of column-marker coordinates, including the intercept column bb0.

method

Character string identifying the fitting method used.

loss_function

Vector of loss-function values at each iteration (MM and PDLB methods only).

iterations

Number of iterations performed (MM and PDLB methods only).

impute_x

Imputed binary matrix (PDLB method only).

Author(s)

Giovany Babativa <jgbabativam@unal.edu.co>

References

Babativa-Marquez, J. G., & Vicente-Villardon, J. L. (2026). Logistic biplot with missing data. In process.

Babativa-Marquez, J. G., & Vicente-Villardon, J. L. (2021). Logistic biplot by conjugate gradient algorithms and iterated SVD. Mathematics, 9(16), 2015. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3390/math9162015")}

Nash, J. C. (2011). Unifying optimization algorithms to aid software system users: optimx for R. Journal of Statistical Software, 43(9), 1–14.

Nash, J. C. (2014). On best practice optimization methods in R. Journal of Statistical Software, 60(2), 1–14.

Nocedal, J., & Wright, S. (2006). Numerical Optimization (2nd ed.). Springer.

Vicente-Villardon, J. L., & Galindo, M. P. (2006). Logistic biplots. In M. Greenacre & J. Blasius (Eds.), Multiple Correspondence Analysis and Related Methods (pp. 503–521). Chapman & Hall.

See Also

plotBLB, pred_LB, fitted_LB

Examples


data("Methylation")

# Fit using the coordinate descent MM algorithm
res_MM <- LogBip(x = Methylation, method = "MM", maxit = 1000)

# Fit using the PDLB algorithm with simulated missing data
set.seed(12345)
n <- nrow(Methylation); p <- ncol(Methylation)
miss <- matrix(rbinom(n * p, 1, 0.2), n, p)
miss <- ifelse(miss == 1, NA, miss)
x_miss <- Methylation + miss
res_PDLB <- LogBip(x = x_miss, method = "PDLB", maxit = 1000)


BiplotML documentation built on May 8, 2026, 5:06 p.m.

Related to LogBip in BiplotML...