plot.krome: Plot coefficients from a "krome" object

Description Usage Arguments Details References Examples

View source: R/plot.krome.R

Description

Produces a coefficient profile plot of the coefficient paths for a fitted krome object.

Usage

1
2
## S3 method for class 'krome'
plot(x, ...)

Arguments

x

fitted krome model.

...

other graphical parameters to plot.

Details

A coefficient profile plot is produced. The x-axis is log(λ). The y-axis is the value of fitted α's.

References

Y. Yang, T. Zhang, and H. Zou. (2017) "Flexible Expectile Regression in Reproducing Kernel Hilbert Space." Technometrics. Accepted.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# create data
N <- 200
X1 <- runif(N)
X2 <- 2*runif(N)
X3 <- 3*runif(N)
SNR <- 10 # signal-to-noise ratio
Y <- X1**1.5 + 2 * (X2**.5) + X1*X3
sigma <- sqrt(var(Y)/SNR)
Y <- Y + X2*rnorm(N,0,sigma)
X <- cbind(X1,X2,X3)

# set gaussian kernel 
kern <- rbfdot(sigma=0.1)

# define lambda sequence
lambda <- exp(seq(log(0.5),log(0.01),len=10))

# run krome
m1 <- krome(x=X, y=Y, kern=kern, lambda = lambda, delta = 2) 

# plot the solution paths
plot(m1)

emeryyi/rome documentation built on May 6, 2019, 9:53 a.m.