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]
st: RE: 回复: st: AW: 回复: AW: 回复: st: re: missing string entry
From 
 
"Nick Cox" <[email protected]> 
To 
 
<[email protected]> 
Subject 
 
st: RE: 回复: st: AW: 回复: AW: 回复: st: re: missing string entry 
Date 
 
Tue, 9 Mar 2010 09:44:39 -0000 
The Stata FAQ does advise 
"The current version of Stata is 11. Please specify if you are using an earlier version; otherwise, the answer to your question is likely to refer to commands or features unavailable to you."
See http://www.stata.com/support/faqs/res/statalist.html#stata
On the first, you can not use -set obs 1- to decrease the number of observations. You need to issue -clear- first. 
Also, please edit posts, as also advised in the FAQ. 
Nick 
[email protected] 
lydia huang
i typed -set obs 1-, 
it came out -obs must be between 28032 and 231975 
             r(198);- in red,
typed -gen  public_medical_insurance_no=""-, 
it came out -public_medical_insurance_no already defined
             r(110);-
typed -replace  public_medical_insurance_no="null" if missing ( public_medical_insurance_no)- 
it came out -missing not found
             r(111);-
Martin Weiss 
> Spell out the function as "missing()":
> 
> 
> *************
> clear*
> set obs 1
> gen x=""
> replace x="null" if missing(x)
> *************
*
*   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/