[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: -Simulate- and dropping variables

From   Maarten buis <>
Subject   Re: st: -Simulate- and dropping variables
Date   Mon, 20 Aug 2007 16:16:15 +0100 (BST)

--- Rachel <> wrote:
> 1. Is there any way to stop -simulate- from dropping certain
> variables before it executes?  It seems to drop all variables within
> the dataset.

-simulate- does not drop variables before it executes, it opens a new
dataset once it is finished. So it does the computations on your
original data, and when the simulation is over it opens a new dataset
that contain the result from the simulation. I presume that that is why
you think that -simulate- drops variables.
> 2. I have a large number of variables] with the same stem "abc10
> abc11 abc12....abc99" I'd like to drop all variables with an abc*
> prefix if any such variables currently exist within the stem.
>  I've tried using -isvar-, but--from my reading--that requires me to
> list out each of these variables.  Is there an easier way?

capture unab todrop : abc*
drop `todrop'

Hope this helps,

Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

Want ideas for reducing your carbon footprint? Visit Yahoo! For Good
*   For searches and help try:

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