Announcement

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

  • Is there a way to access p-value from estimation?

    _b accesses coefficient, _se accesses standard error.

    But how can I access p-value?

    I googled many times using many keywords but I couldn't find. This is something that is likely to have some quick way to do.

  • #2
    if you are talking post-estimation of some kind of regression, take a look at r(table) - e.g.,
    Code:
    mat li r(table)
    if you want to keep using (part of) what is in r(table), save it into another matrix before you lose it
    Code:
    help matrix

    Comment


    • #3
      Does this help?

      Buis, M. L. (2007). Stata tip 53: Where did my p-values go?. The Stata Journal, 7(4), 584-586. https://www.stata-journal.com/sjpdf....iclenum=st0137
      David Radwin
      Senior Researcher, California Competes
      californiacompetes.org
      Pronouns: He/Him

      Comment


      • #4
        Originally posted by Rich Goldstein View Post
        if you are talking post-estimation of some kind of regression, take a look at r(table) - e.g.,
        Code:
        mat li r(table)
        if you want to keep using (part of) what is in r(table), save it into another matrix before you lose it
        Code:
        help matrix
        James, you might also want to be aware of how to refer to certain cells in the matrix r(table). It's always row, then column. In r(table), the rows are the statistics of interest (e.g. beta, se, Z-score, p-value, etc), and the p-values are in the 4th row. All the columns refer to the coefficients in the model. You might type something like:

        Code:
        matrix b = r(table)
        scalar p_1 = b[4,1]
        Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

        When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

        Comment


        • #5
          Thank you so much everyone!

          Comment

          Working...
          X