Computing engine behind sclr.
sclr_fit(y, x, tol = 10^(-7), n_iter = NULL, max_tol_it = 10^4)A vector of observations.
A design matrix.
Tolerance. Used when n_iter is NULL.
Number of Newton-Raphson iterations. tol is ignored when
this is not NULL.
Maximum tolerated iterations. If it fails to converge within this number of iterations, will return with an error.
The likelihood maximisation uses the Newton-Raphson algorithm. Initial values are always 1 for the covariate coefficients (and the associated intercept) and the proportion of infected for the baseline risk. The algorithm will pick a new guess and restart under a set of conditions. 1) Algorithm's iteration produces estimate guesses that cannot be used - baseline risk outside of (0, 1) (likelihood undefined). 2) The second derivative matrix produced by the current estimates is "bad" - positive diagonal or missing values due to failing large number calculations