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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -