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 on April 23, and its replacement, 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" <>
To   <>
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."


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. 


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

typed -replace  public_medical_insurance_no="null" if missing ( public_medical_insurance_no)- 
it came out -missing not found

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:

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