title: Removing outliers linear regression
body: <p>I'm running data through linear regression and discovered outliers. I've tried <code>data=dataframe[-c(&quot;country1&quot;, &quot;country2&quot;),]</code> but the outliers still appear. Can I get some help here? Thank you</p>
  <pre><code>#Remove outliers
  fit &lt;- lm(Robbery ~ Unlawful.acts.involving.controlled.drugs.or.precursors, 
            data=NoNACountry[-c(&quot;Spain&quot;, &quot;Luxembourg&quot;),])
  par(mfrow=c(2,2))
  plot(fit)
  </code></pre>
  <p>I think I've somehow lost the row names, because I think the <code>Robbery</code> and <code>Unlawful.acts...</code> have become vectors? I used the Country names are row labels and the <code>Robbery</code> and <code>Unlawful.acts...</code> are columns. I have been able through guidance from here, to use <code>drop  = FALSE</code> in other code, but I have not been able to incorporate this approach here</p>
  <p>Dataframe information is below</p>
  <pre><code>structure(list(Intentional.homicide = c(2.03, 0.84, 1.14), Attempted.intentional.homicide = c(3.25, 
  1.93, 0.54), Assault = c(5.52, 43.29, 39.54), Kidnapping = c(0.14, 
  0.07, 1.03), Sexual.violence = c(5.38, 50.9, 8.64), Robbery = c(3.42, 
  29.67, 16.9), Unlawful.acts.involving.controlled.drugs.or.precursors = c(70.26, 
  494.05, 78.14), Country.Totals.per.000s = c(90, 620.75, 145.93
  )), row.names = c(&quot;Albania&quot;, &quot;Austria&quot;, &quot;Bulgaria&quot;), class = &quot;data.frame&quot;)
  </code></pre>