[R] glmnet estimates and Tibshirani JRSSB 1996

2014-11-17 Thread Hanck, Christoph
Dear all, I have a question that hopefully is an R question and does not simply arise from my lack of understanding of the LASSO. The code below generates two different sets of relationships between y and X, one in which both variables matter (coefficients .5 each, line 14) and one in which on

[R] assigning a function within a loop

2014-10-29 Thread Hanck, Christoph
Hi, I am trying to run several polynomial regressions on simulated data and produce fitted values with the pol1, pol2 functions (predict produces not so nice plots, see http://www.r-bloggers.com/polynomial-regression-techniques/). Below's a simplified version of what I try to achieve. It seems