Thank you all for the great help. I think the optimize function and approach
solves my problem well.
Edwin Sun
--
View this message in context:
http://r.789695.n4.nabble.com/dnorm-and-qnorm-tp3040427p3041962.html
Sent from the R help mailing list archive at Nabble.com.
___
There is no "reversing the dnorm function" -- dnorm is many to one in
general (in the normal case, 2 to 1 except for the mean). How would
you "reverse" dunif, for example?!
However, with that understanding you could do a simple one dimensional
search within the range you want via optimize(), as in
Not sure if there's a pre-defined function for it, but use your basic
math skills: the normal distribution is
dnorm(x) = 1/(sqrt(2*pi)) * exp(-x^2/2),
so the inverse function (on the interval [0, infinity] is
f = function(x) {sqrt( -2*log(sqrt(2*pi) * x)) }
Since the dnorm function is not 1-to-
On Nov 12, 2010, at 5:35 PM, Edwin Sun wrote:
Hello all,
I have a question about basic statistics. Given a PDF value of
0.328161,
how can I find out the value of -0.625 in R? It is like reversing
the dnorm
function but I do not know how to do it in R.
pdf.xb <- dnorm(-0.625)
pdf.xb
4 matches
Mail list logo