Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stata function equivalent to Excel's Norm.dist (CDF?)

    Hi,
    I'm trying to create a new variable which is the cumulative normal distribution of another variable. I tried normal(), and many other varieties, but I'm not getting the same results I'm getting from Excel's Norm Diet function (cumulative). Is there an equivalent or how can I do this?
    Thanks so much!

  • #2
    The Excel NORM.DIST function allows you to specify the mean and standard deviation. The cumulative normal distribution function in Stata uses only the standard normal distribution. So the expression analogous to NORM.DIST(x, mean, sd) in Excel is
    Code:
    normal((x-mean)/sd)

    Comment


    • #3
      Thank you very much! It solved it.

      Comment


      • #4
        Hi Clyde,
        Thank you very much for your post. What if the function is not cumulative?
        Thank you in advance,
        Jorge

        Comment


        • #5
          So I take it you are referring to the density function of the normal distribution? That would be normalden((x-mean)/sd)

          Comment


          • #6
            Hi Clyde, Thank you for your answer. Yes, you were right, thank you, but I used this code:

            Code:
            gen dm2 =normalden(var1,mean,sd)
            and I got exactly what I wanted.

            Kind regards,
            Jorge
            Last edited by Jorge L. Guzman; 21 Apr 2020, 21:14.

            Comment

            Working...
            X