Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Extracting and displaying results


From   sara hussain <[email protected]>
To   [email protected]
Subject   st: Extracting and displaying results
Date   Wed, 3 May 2006 18:37:11 +0100 (BST)

Dear Statalisters

I am writing to to ask for advice on modifying some
code so that I can extract the standard errors (to 4
decimal places) for the variables D1 and D2 below and
display the results. The final line displays z, D1,
D2, and t. I would be grateful if anyone could help
with adding the standard errors to this line.

Regards

Sara


*****************************************************

qui gen double `X1' = 0;
qui replace  `X1' = (1/`afac')*((`z'-`x1')^`alpha') if
`x1'<=`z';
qui svymean `X1' [pw=`wgt1'], strata(`str1') psu(
psu1');
matrix est1 = e(est);
matrix var1 = e(V_db);
local    D1 = est1[1,1];
local   VD1 = var1[1,1];


qui gen double `X2' = 0;
qui replace  `X2' = (1/`afac')*((`z'-`x2')^`alpha') if
`x2'<=`z';
qui svymean `X2' [pw=`wgt2'], strata `str2')
psu(`psu2');
matrix est2 = e(est);
matrix var2 = e(V_db);
local    D2 = est2[1,1];
local   VD2 = var2[1,1];
local   t = (`D2'`D1')/sqrt`VD1'+`VD2');

display %10.2f `z' "    " %8.2f `D1' "    " %8.2f
%8.2f `D2'  "    "   %4.2f `t';



Send instant messages to your online friends http://uk.messenger.yahoo.com
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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