How to obtain RMSE out of lm result?

后端 未结 4 1251
孤街浪徒
孤街浪徒 2021-02-01 22:06

I know there is a small difference between $sigma and the concept of root mean squared error. So, i am wondering what is the easiest way to obtain

4条回答
  •  北海茫月
    2021-02-01 22:27

    To get the RMSE in one line, with just functions from base, I would use:

    sqrt(mean(res$residuals^2))
    

提交回复
热议问题