Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: setting e(sample)


From   "Nick Winter" <nwinter@policystudies.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: setting e(sample)
Date   Thu, 27 Mar 2003 10:36:58 -0500

> -----Original Message-----
> From: Stephen P. Jenkins [mailto:stephenj@essex.ac.uk] 
> Sent: Thursday, March 27, 2003 10:19 AM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: setting e(sample)
> 
> 
> Advice please about how to set the e(sample) function
> within an e class program.
> 
> -ereturn b V post, esample(varname)- in version 8, and 
> -est b V post, esample(varname)- in version 7,
> are the commands that the manuals refer to for setting e(sample). 
> 
> However both appear to assume that the program has created a 
> coefficient vector ("b") and varcov matrix ("V").
> My problem is that my program does not create these (the 
> estimates are 
> built up in a non-regression based way).
> Is there anyway of creating e(sample) then?
> 
> Stephen

A worst-case approach would be to create a "fake" b and V.  This is the
strategy used by -svymean- and companion commands, when the -complete-
option is not specified.

After a call to -svymean- with the available option, for example, b and
V are as follows:

. mat list e(b)

symmetric e(b)[1,1]
    dummy
y1      0

. mat list e(V)

symmetric e(V)[1,1]
       dummy
dummy      0

--Nick Winter


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index