[R] How to plot density distribution based on mean values and quantiles in R?

David L Carlson dcarlson at tamu.edu
Wed Jul 20 22:14:37 CEST 2016


You can estimate the standard deviation from the quantiles, but based on your example, the data will not be accurately modeled with a normal distribution.

The quantiles .15 and .85 should be 1.036 standard deviations from the mean:

> qnorm(c(.15, .85))
[1] -1.036433  1.036433

However the .15-quantile is .003 smaller than the mean and the .85-quantile is .042 larger than the mean so the data are very strongly right-skewed:

> c(.015-.012, .057-.015)
[1] 0.003 0.042

> round(c(.015-.012, .057-.015)/qnorm(.85), 4)
[1] 0.0029 0.0405

So the standard deviation estimates are .0029 on the left and .0405 on the right. 
Even using a log-normal distribution does not help much.

-------------------------------------
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352

-----Original Message-----
From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of gcchenleidenuniv
Sent: Monday, July 18, 2016 4:11 PM
To: r-help
Subject: [R] How to plot density distribution based on mean values and quantiles in R?

Hi all,

I need to draw density curves based on some published data. But in the article only mean value (0.015 ) and quantiles (Q0.15=0.012 , Q0.85=0.057) were given. So I was thinking if it is possible to plot density curves solely based on the mean value and quantiles. The dnorm(x, mean, sd, log) function needs the standard deviation which was not mentioned, so it can not be used in this situation.

Many thanks!!
Daniel
	[[alternative HTML version deleted]]

______________________________________________
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list