cvx.lip.reg(t, z, w = NULL, L,...)
# S3 method for default
cvx.lip.reg(t, z, w = NULL, L, ...)
# S3 method for cvx.lip.reg
plot(x,...)
# S3 method for cvx.lip.reg
print(x,...)
# S3 method for cvx.lip.reg
predict(object, newdata = NULL, deriv = 0, ...)
nnls
function from the nnls
package to perform the constrained minimization of least squares. plot
function provides the scatterplot along with fitted curve; it also includes some diagnostic plots for residuals. Predict function now allows calculating the first derivative also.nnls
.args(cvx.lip.reg)
x <- runif(50,-1,1)
y <- x^2 + rnorm(50,0,0.3)
tmp <- cvx.lip.reg(x, y, L = 10)
print(tmp)
plot(tmp)
predict(tmp, newdata = rnorm(10,0,0.1))
Run the code above in your browser using DataLab