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: RE: drop observations - if statement
From
R Zhang <[email protected]>
To
[email protected]
Subject
Re: st: RE: drop observations - if statement
Date
Wed, 5 Mar 2014 22:04:41 -0500
I am using stata 12.
On Wed, Mar 5, 2014 at 8:25 PM, Nick Cox <[email protected]> wrote:
> No. Missing for strings has meant empty strings "", and vice versa,
> since the beginning of strings.
>
> Nick
> [email protected]
>
> On 5 March 2014 22:56, Andrew Maurer <[email protected]> wrote:
>
>> Are you using an older version of Stata? Didn't you use to have to manually force strings to the appropriate length? Eg count if cusip == " " (10 spaces).
>
>
> R Zhang
>
>> I used the following commands to drop observations based on a string
>> variable - CUSIP- that takes missing values, i.e. delete observations
>> with missing CUSIP,
>>
>> drop if cusip==""
>>
>> cusip is str10
>>
>> (0 observations deleted)
>>
>> could you explain why "(0 observations deleted)"?
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/