iOLS_plot {IOLS} | R Documentation |
iOLS_plot
Description
Function that plots an iOLS
fitted model object.
Usage
iOLS_plot(m, ..., plot_beta = "")
Arguments
m |
An |
... |
other parameters. |
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. |
Value
a plot of an iOLS
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)
tX = t(X)
library(matlib) ; VX = inv(tX %*% X)
f = iOLS(y, X, VX, tX, 20, b_init = lm_coef)
iOLS_plot(f)
#Only one of the estimated parameters, for example k=0 (the intercept):
iOLS_plot(f, plot_beta = 0)
[Package IOLS version 0.1.4 Index]