Skip to content
Prev 387356 / 398502 Next

quantile from quantile table calculation without original data

On 3/6/21 1:02 AM, Abby Spurdle wrote:
Here's another approach, which uses minimization of the squared error to 
get the parameters for a lognormal distribution.

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 = c(NA, -9L), class = "data.frame")

obj <- function(x) {sum( qlnorm(1-temp$percent, x[[1]], 
x[[2]])-temp$size )^2}

# Note the inversion of the poorly named and flipped "percent" column,

optim( list(a=-0.65, b=0.42), obj)

#--------------------

$par
 ???????? a????????? b
-0.7020649? 0.4678656

$value
[1] 3.110316e-12

$counts
function gradient
 ????? 51?????? NA

$convergence
[1] 0

$message
NULL


I'm not sure how principled this might be. There's no consideration in 
this approach for expected sampling error at the right tail where the 
magnitudes of the observed values will create much larger contributions 
to the sum of squares.