Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Saving p-values in a matrix


From   Matthew White <mwhite@poverty-action.org>
To   statalist@hsphsun2.harvard.edu
Subject   st: Saving p-values in a matrix
Date   Mon, 2 Apr 2012 12:58:12 -0400

Hi all,

I was wondering if there's an easy way to save p-values in a matrix
after an estimation command. Right now after -regress- I'm running
these commands to create a p-value vector named -p-:

mata: st_matrix("p", 2 * ttail(`e(df_r)', abs(st_matrix("e(b)")) :/
sqrt(diagonal(st_matrix("e(V)"))')))
matrix rownames p = `:rownames e(b)'
matrix colnames p = `:colnames e(b)'

But I'd guess there's an easier way I'm missing. I tried looking for
an SSC program, but I couldn't find one easily. (I guess I could use
-parmest, norestore- in combination with -mkmat- along with
-preserve-/-restore-, but this doesn't seem particularly easy.)

Do you have any ideas?

Thanks,
Matt

-- 
Matthew White
Data Coordinator
Innovations for Poverty Action
101 Whitney Avenue, New Haven, CT 06510 USA
+1 434-305-9861
www.poverty-action.org
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index