Computing engine behind sclr.

sclr_fit(
  y,
  x,
  tol = 10^(-7),
  algorithm = c("newton-raphson", "gradient-ascent"),
  nr_iter = 2000,
  ga_iter = 2000,
  n_conv = 3,
  conventional_names = FALSE,
  seed = NULL
)

Arguments

y

A vector of observations.

x

A design matrix.

tol

Tolerance.

algorithm

Algorithms to run. "newton-raphson" or "gradient-ascent". If a character vector, the algorithms will be applied in the order they are present in the vector.

nr_iter

Maximum allowed iterations for Newton-Raphson.

ga_iter

Maximum allowed iterations for gradient ascent.

n_conv

Number of times the algorithm has to converge (to work around local maxima).

conventional_names

If TRUE, estimated parameter names will be (Baseline), (Intercept) and the column names in the model matrix. Otherwise - lambda, beta_0 and beta_ prefix in front of column names in the model matrix.

seed

Seed for the algorithms.

Details

The likelihood maximisation can use the Newton-Raphson or the gradient ascent algorithms.