Skip to content

Percentiles with R for a big data.frame

7 messages · Simonas Kecorius, Duncan Murdoch, David Winsemius

#
On 13-01-21 6:41 PM, Simonas Kecorius wrote:
You didn't define quantiles, so that won't work.  Assuming that's a 
typo, and you meant quantile...
There are lots of different formulas for empirical quantiles.  The ones 
available in R are described in the ?quantile help topic.  What formula 
does OpenOffice use?

Duncan Murdoch
#
On Jan 22, 2013, at 5:58 AM, Simonas Kecorius wrote:

            
You guess? What result and what is "right"?
You have already been told that you are misspelling the name of the R  
function.

The other open question in my mind is whether you were hoping for  
something other than a single quantile (in this case the 10th  
percentile, or perhaps wanted the quantiles that would divide your  
data into deciles?

If you want to do the calculation within groups then the second  
argument to `aggregate` must specify the grouping. By design  
`aggregate` will apply the function on all columns.
2 days later
#
On Jan 23, 2013, at 5:45 AM, Simonas Kecorius wrote:

            
Except for the fact that 'y.ts' is not a dataframe, so you are using a  
function that has different arguments than `aggregate.data.frame`.  
With the `ts` call you implicitly constructed  `ts(data.matrix(data),  
frequency=12)` and will be getting quantile estimates on groups of 12,  
which is not at all what you asked for in the first place.