Announcement

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

  • alternative to statsby that gives significance levels

    Hello,
    My understanding is that statsby ... : regress ... doesn't give significance levels. Is there an alternative that provides significance levels (either in the form of stars or p-values)?
    Thank you,
    Stan

  • #2
    if you specify _b _se as the list of expressions for -statsby- to save, you can calculate your own pvalues from them. This example, using the auto.dta illustrates the approach:
    Code:
    clear*
    sysuse auto
    
    tempfile results
    statsby _b _se e(df_r), by(rep78) saving(`results'): regress price mpg headroom
    
    use `results', clear
    foreach x in mpg headroom cons {
        gen t_`x' = _b_`x'/_se_`x'
        gen p_`x' = 2*ttail(_eq2_stat_1, abs(t_`x'))
    }

    Comment


    • #3
      Great, thank you very much! Didn't know how to extract degrees of freedom.

      Comment

      Working...
      X