Announcement

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

  • random variable with uniform distribution

    I am generating a variable x, that takes a uniform distribution in the interval [0:10]. The variable only takes integer numbers, but when I get summarize, the range is [0:9]. I need that variable takes integer numbers and the variable is in the range [0:10]. My code is:

    generate x int = runiform(0,10)
    sum x

    thanks.

  • #2
    It should be

    Code:
    gen x = runiformint(0,10)

    Comment

    Working...
    X