Hello,

 

I have a dataset which consists of 9 columns (variables) and 35 rows
(observations).  I am doing a simple linear regression of one variable
on the other.  There are some observations that are outliers and I would
like to remove them based on another variable (it's a unique, numeric
variable).  How do you tell R to remove multiple rows (observations)
based on a variable value?

 

For example, I am trying to remove observations that have variable
Identity = 1, 2, 3:

 

Data2<-subset(Data1, Identity!=c(1,2,3))

 

This does not work.  It works if I do it one at a time, but is very time
consuming.  Is there a way to remove all desired observations at once?

 

Thanks!   

 

Kenneth Takagi

kat215@psu.edu

 


	[[alternative HTML version deleted]]

