美文网首页stata数据清洗
summarize 命令--变量描述性分析

summarize 命令--变量描述性分析

作者: 松柏林stata | 来源:发表于2019-04-22 16:00 被阅读17次

描述

summarize命令计算并显示各种单变量摘要统计信息。如果未指定varlist,则计算数据集中所有变量的摘要统计信息。

语法

 summarize [varlist] [if] [in] [weight] [, options]

主要语法解释

1.varlist:需要统计的变量。
2.if :样本条件。
3.in:样本范围。
4.weight:样本权重。

options选项解释

1.detail:显示其他统计信息,包括偏度,峰度,四个最小值和四个最大值以及各种百分位数。
2.meanonly:抑制显示; 只计算平均值; 程序员的选择。仅在未指定细节时才允许,禁止显示结果和计算方差。
3.format:使用变量的显示格式。格式请求使用与变量关联的显示格式而不是默认g显示来显示摘要统计信息。
4.separator(#) :在每个#变量之后绘制分隔线,指定将分隔线插入输出的频率。 默认值为separator(5),这意味着每五个变量后画一条线。separator(10)会在每10个变量后画一条线。separator(0)抑制分离线。
5.display_option:控制间距,线宽,基本和空单元格。

例子

. sysuse auto
. summarize
. summarize mpg weight
. summarize mpg weight if foreign
. summarize mpg weight if foreign, detail
. summarize i.rep78

Stored results

summarize stores the following in r():

Scalars   
  r(N)           number of observations
  r(mean)        mean
  r(skewness)    skewness (detail only)
  r(min)         minimum
  r(max)         maximum
  r(sum_w)       sum of the weights
  r(p1)          1st percentile (detail only)
  r(p5)          5th percentile (detail only)
  r(p10)         10th percentile (detail only)
  r(p25)         25th percentile (detail only)
  r(p50)         50th percentile (detail only)
  r(p75)         75th percentile (detail only)
  r(p90)         90th percentile (detail only)
  r(p95)         95th percentile (detail only)
  r(p99)         99th percentile (detail only)
  r(Var)         variance
  r(kurtosis)    kurtosis (detail only)
  r(sum)         sum of variable
  r(sd)          standard deviation

相关文章

  • summarize 命令--变量描述性分析

    描述 summarize命令计算并显示各种单变量摘要统计信息。如果未指定varlist,则计算数据集中所有变量的摘...

  • fsum外部命令--变量描述性分析

    命令安装 描述 fsum提供汇总统计信息,包括样本N,#缺失,缺失值百分比,均值,方差,标准差,标准误差,P1,P...

  • 2018-08-14-Python数据科学第四章

    描述性统计分析与绘图 变量的度量类型 数值型变量 类别型变量 有序 有大小、高低、次序之分...

  • R数据科学day2-4

    分组新变量 用到的变量有:select(),mutate(),summarize(),filter()。组合使用。...

  • [R语言实战笔记] 第7章 基本统计分析

    本章内容 描述性统计分析频数表和列联表相关系数和协方差t检验非参数统计 7.1 描述性统计分析 连续型变量的中心趋...

  • 列联表分析

    列联表分析是通过分析多个变量在不同取值情况下的数据分布情况,从而进一步分析多个变量之间相互互相关系的一种描述性分析...

  • 第二周:描述性数据分析实践

    描述性统计分析要对调查总体所有变量的有关数据进行统计性描述,主要包括数据的频数分析、集中趋势分析、离散程度分析、分...

  • R语言实战--第7章

    7.1 描述性统计分析 1.描述性统计量命令 --自带 注:summary()函数提供了最小值、最大值、四分位数和...

  • 2018-04-17

    8.【Stata操作视频】面板数据模型2 - 基本操作:描述性分析、画图、生成新变量等网址:https://mp....

  • stata之中介效应分析

    本篇记录下用stata进行中介分析,其中,自变量,中介变量和因变量均为连续变量。 中介分析可以用命令sem,即进行...

网友评论

    本文标题:summarize 命令--变量描述性分析

    本文链接:https://www.haomeiwen.com/subject/axaygqtx.html