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

st: RE: changing number of observations for tempvars


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: changing number of observations for tempvars
Date   Fri, 12 Nov 2004 23:41:15 -0000

Absolutely not. The number of observations 
is a property of your dataset. 

Your dataset is rectangular, with 
dimensions 

	number of observations X 
	number of variables 

If you create new temporary variables, 
the number of observations remains 
the same. Conversely, if you increase 
the number of observations by using 
-set obs-, or if you reduce the number 
of observations by using -drop- or -keep-, 
either change applies to _all_ variables, 
whether permanent or temporary. 

Nick 
n.j.cox@durham.ac.uk 

Ypma, Jelmer Yeb
 
> I'm writing an .ado file where I want to use some -tempvar-s. 
> The number of observations for these -tempvar-s might however 
> be different from the number of observations in the dataset.  
> Is there a way to change just the number of observations for 
> these temporary variables? 
> 

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