Re: [R] Removing Outliers Function

2011-02-09 Thread Carl Witthoft
To answer part 2: You should read up on statistical distributions and when a sample size is (or isn't) large enough to produce reliable statistical parameters such as mean or variance. I suspect David was implying that your yardstick, based on studentized residual, removes valid samples.

Re: [R] Removing Outliers Function

2011-02-09 Thread Greg Snow
ent: Wednesday, February 09, 2011 11:06 AM > To: r-help@r-project.org > Subject: Re: [R] Removing Outliers Function > > > I have two questions, > > 1) if the solutions is only three or four lines of code is there anyway > you > can share those lines, without disrespectin

Re: [R] Removing Outliers Function

2011-02-09 Thread Bert Gunter
If you insist ... 1. You are reinventing wheels (poorly). RSiteSearch("outlier tests",restr="fun") ##RsiteSearch is a handy interface to search facilities on CRAN. # Go to the site directly for more. Or use Google or other search engines. will show you that a R package, outlier, already exists t

Re: [R] Removing Outliers Function

2011-02-09 Thread David Winsemius
On Feb 9, 2011, at 1:25 PM, kirtau wrote: I have two questions, 1) if the solutions is only three or four lines of code is there anyway you can share those lines instead of stating that the solution is easy and providing no code. I prefer not to use an R-Package but have a "raw function".

Re: [R] Removing Outliers Function

2011-02-09 Thread kirtau
I have two questions, 1) if the solutions is only three or four lines of code is there anyway you can share those lines instead of stating that the solution is easy and providing no code. I prefer not to use an R-Package but have a "raw function". 2) Can you explain why you feel that this is "

Re: [R] Removing Outliers Function

2011-02-09 Thread kirtau
I have two questions, 1) if the solutions is only three or four lines of code is there anyway you can share those lines, without disrespecting me further 2) Can you explain why you feel that this is "statistical malpractice" - - AK -- View this message in context: http://r.789695.n4.nabbl

Re: [R] Removing Outliers Function

2011-02-09 Thread Jim Lemon
On 02/09/2011 03:43 PM, David Winsemius wrote: Exactly right. I use the phrase to catch the unwary's attention. I think the effect is properly placed on the y-axis. IIRC, Ben Bolker (or was it Bert Gunter?) has also commented in the R-help or r-devel pages this curious inversion of functional me

Re: [R] Removing Outliers Function

2011-02-08 Thread David Winsemius
__ Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu - Original Message - From: David Winsemius Date: Tuesday, February 8, 2011 10:09 pm Subject:

Re: [R] Removing Outliers Function

2011-02-08 Thread Ravi Varadhan
Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu - Original Message - From: David Winsemius Date: Tuesday, February 8, 2011 10:09 pm Subject: Re: [R] Removing Outliers Function To:

Re: [R] Removing Outliers Function

2011-02-08 Thread David Winsemius
On Feb 8, 2011, at 9:11 PM, kirtau wrote: I am working on a function that will remove outliers for regression analysis. I am stating that a data point is an outlier if its studentized residual is above or below 3 and -3, respectively. The code below is what i have thus far for the funct

[R] Removing Outliers Function

2011-02-08 Thread kirtau
I am working on a function that will remove outliers for regression analysis. I am stating that a data point is an outlier if its studentized residual is above or below 3 and -3, respectively. The code below is what i have thus far for the function x = c(1:20) y = c(1,3,4,2,5,6,18,8,10,8,11,13,14