Statalist


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

st: AW: Return results only from observations used in estimated model


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: Return results only from observations used in estimated model
Date   Sun, 4 Oct 2009 21:21:02 +0200

<> 

Just condition on -e(sample)-. I am not quite sure what "table the results"
is supposed to mean, though.


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

vers 10.1

clear*
set obs 150

gen x1=26+int(27*runiform())
gen x2=runiform()<.48

gen byte draw = /* 
 */ runiform() < /* 
 */ invlogit(1+.02*x1+.3*x2)
 
logistic draw x*

tempvar tem
gen `tem'=runiform()
sort `tem'

drop in 121/150

logistic draw x*
 
table draw if e(sample),  /* 
*/ c(freq mean x1 mean x2) 
*************



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von John Antonakis
Gesendet: Sonntag, 4. Oktober 2009 21:17
An: [email protected]
Betreff: st: Return results only from observations used in estimated model

Hi:

Suppose I run a model using logistic on a data set with 150 observations:

logistic y x z q r

Now, suppose that because of listwise, the number of observations in the 
logistic model are 120.

How would I table the results (using say only variable x and z) based 
ONLY on the data from the logistic model (i.e., the listwise sample) and 
not the whole sample ?

Thanks in advance,
John.

-- 
____________________________________________________

Prof. John Antonakis
Associate Dean Faculty of Business and Economics
University of Lausanne
Internef #618
CH-1015 Lausanne-Dorigny
Switzerland

Tel ++41 (0)21 692-3438
Fax ++41 (0)21 692-3305

Faculty page:
http://www.hec.unil.ch/people/jantonakis&cl=en

Personal page:
http://www.hec.unil.ch/jantonakis
____________________________________________________


*
*   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/


*
*   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