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

st: RE: setting e(sample)

From   "Nick Winter" <>
To   <>
Subject   st: RE: setting e(sample)
Date   Thu, 27 Mar 2003 10:36:58 -0500

> -----Original Message-----
> From: Stephen P. Jenkins [] 
> Sent: Thursday, March 27, 2003 10:19 AM
> To:
> 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]
y1      0

. mat list e(V)

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

--Nick Winter

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index