Hi Statalist,
I'm porting a couple R scripts to Stata and have hit a roadblock. I have been unable to replicate R's pnorm() function in Stata. I've searched this forum, Stata documentation, and the Web to no avail.
R has a dnorm() function that “returns the value of the probability density function (pdf) of the normal distribution” and appears to be the same as Stata’s normalden()
Example:
R: dnorm(-0.2231436, -0.1682927, 0.1931885) returns 1.983462
Stata: normalden(-0.2231436, -0.1682927, 0.1931885) returns 1.9834621
R’s pnorm() function “returns the value of the cumulative density function (cdf) of the normal distribution” and I haven't found a way to replicate it in Stata.
Using the same value, mean, and SD as above…
R: pnorm(-0.2231436, -0.1682927, 0.1931885) returns 0.3882342
Stata: I’ve had no luck.
Do any Statalisters know how to find the value of the CDF of the normal distribution?
Thank you,
Marc Peterson
0 Response to Replicate R's pnorm function
Post a Comment