0

For ridge I now that I have to standardize the the predictors before applying ridge regression. I want to standardize them like in the glmnet function. And I don't know wich formula is used for standardization.
Should I use this: formula to standardize the dependent(y) variable and the independent(x) variable? Or this one: to standardize y which I don't know if it is correct?

Majk
  • 3
  • 1
  • 1
    Could you explain what the second formula is trying to say? It makes no sense: it's not a transformation of $y$ and the right side doesn't even depend on $y$. – whuber Feb 19 '18 at 20:53
  • I mistakenly rejected the edit which would have cleared up the issue that @whuber pointed out; please ignore. – jbowman Feb 19 '18 at 22:27
  • Please register &/or merge your accounts (you can find information on how to do this in the **My Account** section of our [help]), then you will be able to edit & comment on your own question. – gung - Reinstate Monica Feb 20 '18 at 00:17
  • @gung thank you I didn't know that that was as an option – Majk Feb 20 '18 at 00:55
  • @whuber I edited the second formula, I got it from [this](https://stats.stackexchange.com/questions/129179/why-is-glmnet-ridge-regression-giving-me-a-different-answer-than-manual-calculat) post, from the R code: **sd_y – Majk Feb 20 '18 at 00:58
  • It doesn't matter whether $(n-1)/n$ is incorporated or not. See https://stats.stackexchange.com/questions/3931 for instance. – whuber Feb 20 '18 at 02:17

0 Answers0