如何在 Stata 17 中用缺失值替换 0?

huangapple go评论203阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年6月15日 03:31:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/76476979.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定