Skip to content

How to effectively remove Outliers from a binary logistic regression in R

2 messages · Marcus Tullius, Jim Lemon

#
On 09/05/2012 05:40 PM, Marcus Tullius wrote:
Hi Francisco,
Your model didn't make it to the help list, but I think that the problem 
is in your attempt to use the "subset" argument in glm. The vector is 
supposed to include the indices of the values that you _want_ in the 
analysis, and it looks like you are trying to remove the values that you 
_don't_ want. Say you have 2000 rows in your data frame in the model. 
The "subset" argument should look something like this:

glm(MIGRATION,
  subset=!(1:2000 %in% c(56,303,365,391,512,746,859,940,1037,1042,1138, 
1355))

Jim