下面的这个问题是Tibshirani在他的论文<Regression shrinkage and selection via the lasso>里面用到的一个例子,我现在想实现这个模拟,但
不知道改怎么做,在这请教各位前辈了。
论文原文如下:
In this example we simulated 50 data sets consisting of 20 observations from the model
y=beta^{T}*x+sigma*epsilon
where beta=(3,1.5,0,0,2,0,0,0)^{T} and epsilon is standard normal.The correlation between x_i and x_j was rho^{|i-j|} with rho=0.5. We set sigma=3,and this gave a signal-to-noise ratio of approximately 5.7.
这个例子的目的是为了比较几种求解算法的误差,比如lasso,ridge regression,best subset等等。