Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: why -if- does not work in -expandcl-?


From   [email protected] (Jeff Pitblado, StataCorp LP)
To   [email protected]
Subject   Re: st: why -if- does not work in -expandcl-?
Date   Tue, 18 May 2010 14:21:34 -0500

Grace Jessie <[email protected]> is using -expandcl- with an -if-
restriction, but the -if- restriction is not being properly applied:

> I found -if- did not work in the -expandcl-.
> For example,
>  
> 
> . clear
> . input x y
>              x          y
>   1. 1 1
>   2. 2 1
>   3. end
> . expandcl 2 if x==1,gen(new) cl(y)
> (2 observations created)
> . l
>      +-------------+
>      | x   y   new |
>      |-------------|
>   1. | 1   1     2 |
>   2. | 1   1     1 |
>   3. | 2   1     2 |
>   4. | 2   1     1 |
>      +-------------+
> 
> Why also expand when x equals 2?

Grace found a bug in -expandcl-.  We have determined the cause; the fix will
be available in the next ado-file update.

--Jeff
[email protected]
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index