Announcement

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

  • Missing statistical function:chi2

    I am trying to obtain values from the chi2 distribution manually by using functions such as:

    chi2
    chi2tail
    invchi2tail

    however I get this error:

    . chi2(11, 0.05)
    command chi2 is unrecognized
    r(199);

    I have searched the forums and tried the "help" function but cannot seem to find a fix - any ideas?

  • #2
    You're limited to invoking only commands at the command line in Stata. That is, you're not permitted solely to call a function there. So, you would use a command that itself can take a function's return value. Something like the following:
    Code:
    display chi2(11, 0.05)

    Comment


    • #3
      https://www.stata-journal.com/articl...article=dm0058 makes this point among others. The distinction between command and function in Stata is hard and fast but easily learned. For example, help is a command, not a function.

      Comment


      • #4
        Thank you both, very helpful and greatly appreciated.

        Comment

        Working...
        X