iOLS_path_plot {IOLS} | R Documentation |
iOLS_path_plot
Description
Function that plots an iOLS_path
fitted model object.
Usage
iOLS_path_plot(m, delta_rank = NULL, plot_beta = "", ...)
Arguments
m |
An |
delta_rank |
Among all the hyper-parameters delta, we can choose to plot the "iOLS_path" fitted model object corresponding to the chosen delta_rank. If a value is not precised, the default value is NULL and the function will only display the estimated parameter(s) in function of log(delta). |
plot_beta |
If you want to see the trajectory of one estimated parameter beta only, just precise plot_beta = k (k=0 if you want to see the intercept's trajectory for example). Otherwise, write plot_beta = "" (the default value), and you will see all parameters' trajectory. In this case, the colors of each curve is assigned randomly, but by precising which parameters' trajectory you want to see, it will be drawn in black. |
... |
other parameters. |
Value
a plot of an iOLS_path
fitted model object.
Examples
data(DATASET)
y = DATASET$y
x = as.matrix(DATASET[,c("X1","X2")])
lm = lm(log(y+1) ~ x)
lm_coef = c(coef(lm))
X = cbind(rep(1, nrow(x)), x)
k = iOLS_path(y, X, b_init = lm_coef, deltainf = 10^-5,
deltasup = 10^4, nbre_delta = 20,
epsi = 10^-3, error_type = "HC0")
#All the parameters, as a function of log(delta) (ie. each triplet from an iOLS regression) :
iOLS_path_plot(k)
#All the parameters from the 6th iOLS regression :
iOLS_path_plot(k, delta_rank = 6)
#Intercept from the 6th iOLS regression :
iOLS_path_plot(k, delta_rank = 6, plot_beta = 0)