[R] negatively skewed data; reflecting

Michael Kubovy kubovy at virginia.edu
Wed Aug 23 15:11:22 CEST 2006


On Aug 23, 2006, at 8:08 AM, z.dalton at lancaster.ac.uk wrote:

> I have constructed histograms of various variables in my dataset.   
> Some of them are negatively skewed, and hence need data  
> transformations applied.  I know that you first need to reflect the  
> negatively skewed data and then apply another transformation such  
> as log, square root etc to bring it towards normailty. How is it  
> that I reflect data in R?
>
>> hist(Lsoc)  #how do I reflect Lsoc in R?

To reflect the vector Lsoc, assuming the numbers are positive, and  
keep them positive in order to take (e.g.) logs,
log(-Lsoc + max(Lsoc) + 1).

But if you do a Google search on 'ladder powers negative skew' you'll  
find another answer. The idea of the ladder of powers is due to J W  
Tukey.
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS:     P.O.Box 400400    Charlottesville, VA 22904-4400
Parcels:    Room 102        Gilmer Hall
         McCormick Road    Charlottesville, VA 22903
Office:    B011    +1-434-982-4729
Lab:        B019    +1-434-982-4751
Fax:        +1-434-982-4766
WWW:    http://www.people.virginia.edu/~mk9y/



More information about the R-help mailing list