NAG has the most comprehensive numerical library, which I once purchased with personal funds. I wonder why, when NAG has one of the most up-to-date Fortran compilers, that its Fortran library has an old-fashioned Fortran 77 interface. For example, I am implementing ridge regression and wondered if the NAG library had it. It does, with the following interface:
Subroutine g02kaf (n, m, x, ldx, isx, ip, tau, y, h, opt, niter, tol, nep, orig, b, vif, res, rss, df, optloo, perr, ifail)
Integer, Intent (In) :: n, m, ldx, isx(m), ip, opt, orig, optloo
Integer, Intent (Inout) :: niter, ifail
Integer, Intent (Out) :: df
Real (Kind=nag_wp), Intent (In) :: x(ldx,m), tau, y(n), tol
Real (Kind=nag_wp), Intent (Inout) :: h
Real (Kind=nag_wp), Intent (Out) :: nep, b(ip+1), vif(ip), res(n), rss, perr(5)
It should not be necessary for the Fortran programmer to pass array dimensions, and reasonable defaults should be used to minimize the number of required parameter settings for the algorithm.
In R the ridge regression call is just
fit = glmnet(x_var, y_var, alpha = 0, lambda = lambda_seq)
summary(fit)
NAG does a Fortran 90 numerical library, but it has less functionality than the F77 one. The regression and correlation section appears not to include ridge regression.
If NAG were to create modern Fortran wrappers for all of the functionality in its Fortran library, that would make it easier to use.