Statalist


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

st: Re: How do I keep the same sample size without deleting cases?


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: Re: How do I keep the same sample size without deleting cases?
Date   Sat, 20 Jun 2009 13:35:28 +0200

<>

As long as the results of the estimation command have not been overwritten, you can also use -e(sample)- itself...

**********
sysuse auto, clear
probit foreign rep78/*
*/ price mpg weight
tab mpg foreign if e(sample)
su displacement turn/*
*/ if e(sample)
**********


HTH
Martin
_______________________
----- Original Message ----- From: "dimitris souftas" <[email protected]>
To: "statalist correct" <[email protected]>
Sent: Saturday, June 20, 2009 12:37 PM
Subject: st: How do I keep the same sample size without deleting cases?



*****


Hi everybody,

I am a new stata user, so excuse me for my ignorance...I am using panel data and I want to do my descriptive analysis and my exploratory analysis having (of course) the same number of observations. I first rum my prbot model and then I make tables with means using e(sample in my "if" statement and everything goes well. However when I do crostabs (using ta or table) the number of observations is different (higher to be exact). I have observed, while making the means tables, that when I dont include in my descriptives all the variables used in the probit model then the sample size changes. How can I keep the sample size the same without deleting the missings?

Thank you for your understanding,

                          Dimitris Souftas



_________________________________________________________________
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/
*
*   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