Removing MULTIPLE outliers in regression model in R -
this in r
ok i've used cook distances identify points remove dataset of 506 variables have.
i able remove 1 point (number 369) follows:
modelmc1 = lm(housing[-369,14] ~ housing[-369,1] + housing[-369,2] + housing[-369,3] + housing[-369,4] + housing[-369,5] + housing[-369,6] + housing[-369,7] + housing[-369,8] + housing[-369,9] + housing[-369,10] + housing[-369,11] + housing[-369,12] + housing[-369,13])
my question how remove multiple points (around 30)
thanks
you can leave out multiple rows in data frame using vector c()
.
modelmc1 = lm(housing[c(-361, -367, -369),14] ~ housing[c(-361, -367, -369),1] + ...)
Comments
Post a Comment