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: drop observations - if statement
From
R Zhang <[email protected]>
To
[email protected]
Subject
Re: st: drop observations - if statement
Date
Wed, 5 Mar 2014 22:03:07 -0500
thank you Jeph!
I did "count if missing(cusip)", it shows zero observation. but when
the data is openned in browse mode, cusip field is displayed as "." ,
is that not missing?
On Wed, Mar 5, 2014 at 6:00 PM, Jeph Herrin <[email protected]> wrote:
> Are you sure any are missing?
>
> Try
>
> count if missing(cusip)
>
> and see what you get.
>
> hth,
> Jeph
>
>
>
>
> On 3/5/2014 5:41 PM, R Zhang wrote:
>>
>> Hi all,
>>
>> 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)"?
>>
>> thanks,
>>
>> Rochelle
>> *
>> * 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/
*
* 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/