Skip to content
Prev 31096 / 398513 Next

Fast R implementation of Gini mean difference

Thank you to Deepayan Sarkar and Berwin Turlach for reminding me of
the outer() function. A quick comparison shows outer() to be more than
10 times faster than the nested for() loop. The memory does blow out a
bit (ran out of memory with a vector of 10000 elements), but it would
be rare for me to calculate a mean difference for that many. Thanks 
again!


Regards,

Andrew C. Ward

CAPE Centre
Department of Chemical Engineering
The University of Queensland
Brisbane Qld 4072 Australia
andreww at cheque.uq.edu.au

Quoting Deepayan Sarkar <deepayan at stat.wisc.edu>: