楼主: s3y2m7
4903 7

[数据管理求助] 空缺值问题 [推广有奖]

  • 1关注
  • 0粉丝

本科生

57%

还不是VIP/贵宾

-

威望
0
论坛币
4 个
通用积分
6.7928
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
3666 点
帖子
20
精华
0
在线时间
168 小时
注册时间
2013-11-20
最后登录
2025-3-7

楼主
s3y2m7 发表于 2014-11-15 15:27:53 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
请问空缺值是包含在什么范围内?比如说要一个变量的范围是大于零的,其中也包括空缺值吗?另外两个变量都是数值型的,一个空缺值加一个数字是等于这个数字?还是等于空缺值?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:数值型

沙发
garlic123 发表于 2014-11-16 20:32:23
第一:你说的空缺值应该是missing value   ,在stata中它就等于.
第二:变量范围大于0,应该没有包含缺失值的。
第三:最后一个你自己加一下就可以看到结果了,应该是回到那个数值。
有不对的地方还请见谅
已有 1 人评分论坛币 学术水平 热心指数 收起 理由
SpencerMeng + 20 + 1 + 1 观点有启发

总评分: 论坛币 + 20  学术水平 + 1  热心指数 + 1   查看全部评分

藤椅
s3y2m7 发表于 2014-11-17 10:47:15
garlic123 发表于 2014-11-16 20:32
第一:你说的空缺值应该是missing value   ,在stata中它就等于.
第二:变量范围大于0,应该没有包含缺失 ...
谢谢。

板凳
skylandocean 在职认证  发表于 2016-8-12 11:35:16
garlic123 发表于 2014-11-16 20:32
第一:你说的空缺值应该是missing value   ,在stata中它就等于.
第二:变量范围大于0,应该没有包含缺失 ...
试了一下,好像是数字-缺失值=缺失值,崩溃了

报纸
蓝色 发表于 2016-8-12 16:15:31
看Stata的帮助missing values的解释啊。
这个不能猜啊。
Stata里面有27种缺失值表示,

Title

    [U] 12.2.1 Missing values
Description
    Stata has 27 numeric missing values:
        ., the default, which is called the "system missing value" or sysmiss
    and
       .a, .b, .c, ..., .z, which are called the "extended missing values".

    Numeric missing values are represented by large positive values.  The ordering is
                                   all nonmissing numbers < . < .a < .b < ... < .z
    Thus, the expression age > 60 is true if variable age is greater than 60 or missing.
    To exclude missing values, ask whether the value is less than ".".  For instance,
        . list if age > 60 & age < .

    To specify missing values, ask whether the value is greater than or equal to ".".  For instance,

        . list if age >=.

    Stata has one string missing value, which is denoted by "" (blank).


Remarks

    More details concerning missing values and their treatment in Stata are provided under the following headings:

        Overview
        Expressions
        Operators
        Functions
        Matrices
        Useful commands
        Value labels
        Estimation commands
        Technical note:  Version 7 and earlier


    Overview

    1.  Stata supports different types of numeric missing values that can be used to specify different reasons that
        a value is unknown.  The most frequently used missing value ., referred to as sysmiss, is nearly always
        generated by Stata when it cannot assign a specific value.  The 26 extended missing values .a, .b, ..., .z
        are available to users requiring more elaborate tracking of missing values.

        Empty strings are treated as missing values of type string.

    2.  Numeric missing values are represented by large positive values.  This means that an expression such as
        income > 100 evaluates to true for missing values of the variable income, as well as to those that are
        greater than 100.  Also, the simple expression if varname evaluates to true for all nonzero values of
        varname, including missing values.

    3.  The ordering of missing values is

                                   all nonmissing numbers < . < .a < .b < ... < .z

    4.  Most Stata statistical commands deal with missing values by disregarding observations with one or more
        missing values (called "listwise deletion" or "complete cases only").

地板
xxbxxb789456 学生认证  发表于 2019-4-10 20:34:46
garlic123 发表于 2014-11-16 20:32
第一:你说的空缺值应该是missing value   ,在stata中它就等于.
第二:变量范围大于0,应该没有包含缺失 ...
stata的数据文件中,缺失值的表现形式并不只有“.”,一般的还有“.d”“.e”....“.r”,类似的都是空缺值,如果不了解数据中的数值形态,而是自己默认所有空缺值都是“.”,那么在处理空缺值(比如drop if VAR==.)的时候就会漏掉很多。

7
xxbxxb789456 学生认证  发表于 2019-4-10 20:36:28
蓝色 发表于 2016-8-12 16:15
看Stata的帮助missing values的解释啊。
这个不能猜啊。
Stata里面有27种缺失值表示,
是的,好多人都以为缺失值只有一种形式——“.”,然后处理数据的时候用!=.或者==.这样的命令,会漏掉很多

8
纵使相逢应不识 学生认证  发表于 2020-3-20 11:10:18
garlic123 发表于 2014-11-16 20:32
第一:你说的空缺值应该是missing value   ,在stata中它就等于.
第二:变量范围大于0,应该没有包含缺失 ...
如果我们简单的将空缺值替换成0会有什么后果

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-31 10:07