更新时间:2023-02-18 12:00:16
您可以构建自己的库:
rqfn.f
和rqfnb.f
. stepy
方法需要后者.R CMD SHLIB rqfn.f rqfnb.f
使用如下函数:
rqfn.f
and rqfnb.f
. The latter is needed for stepy
method.R CMD SHLIB rqfn.f rqfnb.f
use the function like this:
data(stackloss)
x <- stack.x
y <- stack.loss
n <- length(y)
p <- ncol(x)
dyn.load(paste0("rqfn", .Platform$dynlib.ext))
.Fortran("rqfn",
as.integer(n),
as.integer(p),
a = as.double(t(as.matrix(x))),
c = as.double(y),
rhs = double(p),
d = double(n),
beta = as.double(0.99995),
eps = as.double(1e-6),
tau = as.double(0.5),
wn = double(10 * n),
wp = double((p + 3) * p),
aa = double(p * p),
it.count = integer(2),
info = integer(1))