Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[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" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
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 
n.j.cox@durham.ac.uk 

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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index