Description Usage Arguments Details Value See Also Examples
This functions computes the Bayesian regularization path for coefficient, prediction, correlation and 1-step ahead impulse, given a sequence of lambda or gamma.
1 |
x |
For For |
y |
For For |
r.type |
Model type: |
p.type |
Path type: |
lambda |
See |
gamma |
See |
alpha |
See |
Time |
See |
Only one of lambda
and gamma
can be an increasing sequence and another one is a non-negative scalar (typical 0).
For p.type = "coef","pred"
, lambda
is a sequence.
For p.type = "corr","impul"
, gamma
is a sequence.
path |
A vector/matrix/array of regularization result. The first dimension size equals to the length of parameter sequence. |
1 2 3 4 5 6 7 8 9 10 11 12 | ## simulating data
beta <- matrix(c(0.9,-0.1,-0.1,0.8),2,2)
x <- t(rep(0,2))
for (i in 1:1000)
x<-rbind(x,t(beta%*%x[i,])+rnorm(2))
x <- x[-1,]
## set the regularization parameter lambda
lambda = seq(0,0.1,by=0.01)
## compute regularization path
path(x=x,gamma=0,lambda=lambda,p.type="pred",r.type="var")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.