モデルを適用する前に外れ値を削除したいと考えています。トレンド ラインを区切るために黄土曲線を使用しており、外れ値の制限を設定しています。定義された制限外の行を削除したいと思います。各ポイントを一度に 1 つずつ取得し、ローカルの黄土の勾配などをチェックするカスタム関数でこれを行う以外に...もっと簡単な方法はありますか?
# Code generating image above
scatter.smooth( idam$T_d, idam$T_x10d)
loessline <- loess.smooth( idam$T_d, idam$T_x10d)
lines(loessline$x, loessline$y, lwd=3)
lines(loessline$x, loessline$y*1.2, lwd=3, col='red')
lines(loessline$x, loessline$y/1.2, lwd=3, col='red')