r - Find quantiles of gamma like distribution -


the data gamma distributed.

enter image description here

to replicate data this:

a) first find distrib. parameters of true data:

fitdist(datag, "gamma", optim.method="nelder-mead") 

b) use parameters shape, rate, scale simulate data:

data <- rgamma(10000, shape=0.6, rate=4.8, scale=1/4.8) 

to find quantiles using qgamma function in r, just:

edit:

qgamma(c(seq(1,0.1,by=-0.1)), shape=0.6, rate =4.8, scale = 1/4.8, log = false) 

how can find quantiles true data (not simulated rgamma)?

please note quantile r function returns desired quantiles of true data (datag) these understand assuming data distributed. can see not.

quantile(datag, seq(0,1, by=0.1), type=7) 

what function in r use or otherwise how obtain statistically quantiles highly skewed data?

in addition, make sense somewhat? still not getting lower values!

fn <- ecdf(datag) fn(seq(0.1,1,by=0.1)) 

quantiles returned "q" functions, in case qgamma. data eyeball integration suggests of data left of 0.2 , if ask 0.8 quantile see 80% of data in estimated distribution left of:

 qgamma(.8, shape=0.6, rate=4.8) #[1] 0.20604 

seems agree have plotted. if wanted 0.8 quantile in sample have, just:

 quantile(datag, 0.8) 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -