Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Saving p-values in a matrix
From
Matthew White <[email protected]>
To
[email protected]
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/