Re: [R] quantile from quantile table calculation without original data

2021-03-12 Thread Abby Spurdle
d Winsemius > > Sent: Sunday, March 7, 2021 1:33 AM > > To: Abby Spurdle ; PIKAL Petr > > > > Cc: r-help@r-project.org > > Subject: Re: [R] quantile from quantile table calculation without original > > data > > > > > > On 3/6/21 1:02 AM, Abby S

Re: [R] quantile from quantile table calculation without original data

2021-03-08 Thread PIKAL Petr
David Winsemius > Sent: Sunday, March 7, 2021 1:33 AM > To: Abby Spurdle ; PIKAL Petr > > Cc: r-help@r-project.org > Subject: Re: [R] quantile from quantile table calculation without original > data > > > On 3/6/21 1:02 AM, Abby Spurdle wrote: > > I came up w

Re: [R] quantile from quantile table calculation without original data

2021-03-08 Thread Jeff Newmiller
I am aware of that... I have my own functions for this purpose that use splinefun. But if you are trying to also do other aspects of probability distribution calculations, it looked like using fBasics would be easier than re-inventing the wheel. I could be wrong, though, since I haven't used

Re: [R] quantile from quantile table calculation without original data

2021-03-08 Thread Martin Maechler
> Jeff Newmiller > on Fri, 05 Mar 2021 10:09:41 -0800 writes: > Your example could probably be resolved with approx. If > you want a more robust solution, it looks like the fBasics > package can do spline interpolation. base R's spline package does spline interpolation

Re: [R] quantile from quantile table calculation without original data

2021-03-06 Thread David Winsemius
On 3/6/21 1:02 AM, Abby Spurdle wrote: I came up with a solution. But not necessarily the best solution. I used a spline to approximate the quantile function. Then use that to generate a large sample. (I don't see any need for the sample to be random, as such). Then compute the sample mean

Re: [R] quantile from quantile table calculation without original data

2021-03-06 Thread Abby Spurdle
I came up with a solution. But not necessarily the best solution. I used a spline to approximate the quantile function. Then use that to generate a large sample. (I don't see any need for the sample to be random, as such). Then compute the sample mean and sd, on a log scale. Finally, plug

Re: [R] quantile from quantile table calculation without original data

2021-03-05 Thread Abby Spurdle
I'm sorry. I misread your example, this morning. (I didn't read the code after the line that calls plot). After looking at this problem again, interpolation doesn't apply, and extrapolation would be a last resort. If you can assume your data comes from a particular type of distribution, such as a

Re: [R] quantile from quantile table calculation without original data

2021-03-05 Thread Abby Spurdle
I note three problems with your data: (1) The name "percent" is misleading, perhaps you want "probability"? (2) There are straight (or near-straight) regions, each of which, is equally (or near-equally) spaced, which is not what I would expect in problems involving "quantiles". (3) Your plot

Re: [R] quantile from quantile table calculation without original data

2021-03-05 Thread David Winsemius
On 3/5/21 1:14 AM, PIKAL Petr wrote: Dear all I have table of quantiles, probably from lognormal distribution dput(temp) temp <- structure(list(size = c(1.6, 0.9466, 0.8062, 0.6477, 0.5069, 0.3781, 0.3047, 0.2681, 0.1907), percent = c(0.01, 0.05, 0.1, 0.25, 0.5, 0.75, 0.9, 0.95, 0.99)),

Re: [R] quantile from quantile table calculation without original data

2021-03-05 Thread Jeff Newmiller
Your example could probably be resolved with approx. If you want a more robust solution, it looks like the fBasics package can do spline interpolation. You may want to spline on the log of your size variable and use exp on the output if you want to avoid negative results. On March 5, 2021

[R] quantile from quantile table calculation without original data

2021-03-05 Thread PIKAL Petr
Dear all I have table of quantiles, probably from lognormal distribution dput(temp) temp <- structure(list(size = c(1.6, 0.9466, 0.8062, 0.6477, 0.5069, 0.3781, 0.3047, 0.2681, 0.1907), percent = c(0.01, 0.05, 0.1, 0.25, 0.5, 0.75, 0.9, 0.95, 0.99)), .Names = c("size", "percent" ), row.names =