英文:
How to replace 0 with missing values in Stata 17?
问题
我在Stata中将零值更改为缺失值时遇到了问题。当我尝试更改时,出现以下内容:
replace Political_spectrum= . if Political_spectrum== 0
(0 real changes made)
问题是什么?
英文:
I have a problem with changing zeros to missing values in Stata. When I try to change it this comes up:
replace Political_spectrum= . if Political_spectrum== 0
(0 real changes made)
What is the problem?
答案1
得分: 3
将Political_spectrum的缺失值替换为0
英文:
replace Political_spectrum = 0 if missing(Political_spectrum)
答案2
得分: 0
To check on missing values, you can go:
tabulate Political_spectrum, missing
and if necessary:
tabulate Political_spectrum, missing nolabel
as extended missing values .a
to .z
may be present and may be under a value label.
英文:
To check on missing values, you can go
tabulate Political_spectrum, missing
and if necessary
tabulate Political_spectrum, missing nolabel
as extended missing values .a
to .z
may be present and may be under a value label.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论