Statalist


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

Re: st: AW: xml_tab


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   Re: st: AW: xml_tab
Date   Mon, 23 Feb 2009 00:02:56 +0100

<>
John wants to employ the approach outlined in my post back in January, which was designed for -regress- where the results are derived from the t-distribution, to -logit-. For the details, see M.Buis (2008): http://www.stata-journal.com/article.html?article=st0137, section 4-


Here is the code for his problem:

***********
webuse lbw2, clear
logit low age lwt race2 race3 smoke ptl ht ui

mata
b = st_matrix("e(b)")'
V = st_matrix("e(V)")
se = diagonal(cholesky(diag(V)))
st_matrix("mymat",(b, se, b:/se, 2*normal(-abs(b:/se)),b :-invnormal(0.975):*se, b :+ invnormal(0.975):*se))
end

xml_tab mymat, replace
!start C:\Users\ma\Documents\Stata/stata_out.xml

***********


HTH
Martin
_______________________
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index