Re: [R] Eliminate cases in a subset of a dataframe

2009-09-14 Thread Hollix
Hi Guys, thank you all for you comments. Actually, I had a typo and you'r right that it should be "subdata[-c(11,22,33) , ]" However, this does not work well either. I think, I know the reason: In the diagnostic diagramm (that you get with plot(linreg) ), the number which are assigned to the mo

Re: [R] Eliminate cases in a subset of a dataframe

2009-09-14 Thread John Kane
At a quick glance, your code seems to be deleting columns not rows try y[-c(11,22,33), ] --- On Mon, 9/14/09, Hollix wrote: > From: Hollix > Subject: [R] Eliminate cases in a subset of a dataframe > To: r-help@r-project.org > Received: Monday, September 14, 2009, 10:57 AM &

Re: [R] Eliminate cases in a subset of a dataframe

2009-09-14 Thread James W. MacDonald
linmod2 <- update(linmod, data = subdata[-c(11,22,33),]) Hollix wrote: Hi folks, I created a subset of a dataframe (i.e., selected only men): subdata <- subset(data,data$gender==1) After a residual diagnostic of a regression analysis, I detected three outliers: linmod <- lm(y ~ x, data=subda

Re: [R] Eliminate cases in a subset of a dataframe

2009-09-14 Thread Steve Lianoglou
Hi Holger, On Sep 14, 2009, at 10:57 AM, Hollix wrote: Hi folks, I created a subset of a dataframe (i.e., selected only men): subdata <- subset(data,data$gender==1) After a residual diagnostic of a regression analysis, I detected three outliers: linmod <- lm(y ~ x, data=subdata) plot(linmo

[R] Eliminate cases in a subset of a dataframe

2009-09-14 Thread Hollix
Hi folks, I created a subset of a dataframe (i.e., selected only men): subdata <- subset(data,data$gender==1) After a residual diagnostic of a regression analysis, I detected three outliers: linmod <- lm(y ~ x, data=subdata) plot(linmod) Say, the cases 11,22, and 33 were outliers. Here comes