Learn R Programming

gettingtothebottom (version 3.2)

plot_nnm_obj: MM Algorithm - Plot NNM Objective

Description

plot_nnm_obj Function for plotting the NNM Objective Function

Usage

plot_nnm_obj(y, X, b, max_iter = 100)

Arguments

y
Nonnegative response
X
Nonnegative design matrix
b
Nonnegative initial regression vector
max_iter
(Optional) Maximum number of iterations

Examples

Run this code
set.seed(12345)
n <- 100
p <- 3
X <- matrix(rexp(n*p,rate=1),n,p)
b <- matrix(runif(p),p,1)
y <- X %*% b + matrix(abs(rnorm(n)),n,1)

plot_nnm_obj(y,X,b)

Run the code above in your browser using DataLab