Learn R Programming

nlsic (version 1.2.0)

Non Linear Least Squares with Inequality Constraints

Description

We solve non linear least squares problems with optional equality and/or inequality constraints. Non linear iterations are globalized with back-tracking method. Linear problems are solved by dense QR decomposition from 'LAPACK' which can limit the size of treated problems. On the other side, we avoid condition number degradation which happens in classical quadratic programming approach. Inequality constraints treatment on each non linear iteration is based on 'NNLS' method (by Lawson and Hanson). We provide an original function 'lsi_ln' for solving linear least squares problem with inequality constraints in least norm sens. Thus if Jacobian of the problem is rank deficient a solution still can be provided. However, truncation errors are probable in this case. Equality constraints are treated by using a basis of Null-space. User defined function calculating residuals must return a list having residual vector (not their squared sum) and Jacobian. If Jacobian is not in the returned list, package 'numDeriv' is used to calculated finite difference version of Jacobian. The 'NLSIC' method was fist published in Sokol et al. (2012) .

Copy Link

Version

Install

install.packages('nlsic')

Monthly Downloads

300

Version

1.2.0

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Serguei Sokol

Last Published

January 28th, 2026

Functions in nlsic (1.2.0)

g

Shortcut for glue::glue extrapolating character strings
ls_ln_svd

Linear Least Squares, least norm solution (by svd)
ldp

Least Distance Problem
lsi

Linear Least Squares with Inequality constraints (LSI)
Nulla

Null-space basis
equa2vecmat

Parse linear equations/inequalities
ls_0

Particular solution of rank-deficient least squares
lsi_ln

Linear Least Squares with Inequality constraints, least norm solution
join

Join elements into a string
ls_ln

Linear Least Squares, least norm solution
lsie_ln

Linear Least Squares problem with inequality and equality constraints, least norm solution
tls

Total Least Squares a%*%x ~= b
lsi_reg

Regularized Linear Least Squares
nlsic

Non Linear Least Squares with Inequality Constraints
uplo2uco

Transform box-type inequalities into matrix and vector form
pnull

Particular least-squares solution and Null-space basis