hregpath <- function(x, y, nlam, flmin, ulam, isd,
eps, dfmax, pmax, jd, pf, pf2, maxit, lam2, delta, nobs, nvars, vnames) {
#################################################################################
#data setup
y <- as.double(y)
if (delta < 0)
stop("delta must be non-negative")
delta <- as.double(delta)
#################################################################################
# call Fortran core
fit <- .Fortran("hreglassoNET", delta, lam2, nobs, nvars, as.double(x),
as.double(y), jd, pf, pf2, dfmax, pmax, nlam, flmin, ulam,
eps, isd, maxit, nalam = integer(1), b0 = double(nlam),
beta = double(pmax * nlam), ibeta = integer(pmax), nbeta = integer(nlam),
alam = double(nlam), npass = integer(1), jerr = integer(1),
PACKAGE = "rome")
#################################################################################
# output
outlist <- getoutput(fit, maxit, pmax, nvars, vnames)
outlist <- c(outlist, list(npasses = fit$npass, jerr = fit$jerr))
class(outlist) <- c("hregpath")
outlist
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.