loess line not plotting correctly

后端 未结 1 684
攒了一身酷
攒了一身酷 2021-01-12 17:39

I\'m having trouble fitting a loess smooth plus confidence limits to a scatterplot of residuals.

My model is height ~ weight + chest circumference. To check linearit

1条回答
  •  -上瘾入骨i
    2021-01-12 18:15

    lines connects the points in the order in which they appear, which is sometimes undesirable. You can sort them as follows:

    i <- order(bf.red$chestc)
    lines(bf.red$chestc[i], lo.pred$fit[i])
    ...
    

    0 讨论(0)
提交回复
热议问题