楼主: wdjjok
2149 5

[编程问题求助] 请问STATA 如何使用BENFORD法则检验呢? [推广有奖]

  • 3关注
  • 0粉丝

本科生

6%

还不是VIP/贵宾

-

威望
0
论坛币
1290 个
通用积分
2.2001
学术水平
0 点
热心指数
2 点
信用等级
0 点
经验
285 点
帖子
28
精华
0
在线时间
88 小时
注册时间
2013-2-5
最后登录
2023-7-2

楼主
wdjjok 发表于 2017-4-1 10:37:21 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
请问STATA 如何使用BENFORD法则检验呢?
必有重谢!!!
真的很急

二维码

扫码加我 拉你入群

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

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

关键词:Benford Stata 如何使用 tata Ford 如何

回帖推荐

蓝色 发表于4楼  查看完整内容

自己下载安装 help for benford (Nikos Askitas) Apply Benford's Law to a variable --------------------------------------------------- benford varname Description ----------- benford reads in the values of a variable and returns a 4 column table: Column 1 contains the digits 1 through 9, column 2 contains the total number of values in t ...

沙发
军少 学生认证  发表于 2017-4-1 11:11:41
stata不是可以直接使用这个命令嘛

藤椅
wdjjok 发表于 2017-4-1 12:04:50
军少 发表于 2017-4-1 11:11
stata不是可以直接使用这个命令嘛
是在哪个位置呢?

板凳
蓝色 发表于 2017-4-1 12:21:52
自己下载安装

help for benford                             (Nikos Askitas)

Apply Benford's Law to a variable
---------------------------------------------------

        benford     varname [if] [in]


Description
-----------

benford reads in the values of a variable and returns a 4 column table:
Column 1 contains the digits 1 through 9, column 2 contains the total number
of values in the variable starting with that digit, Column 3 contains the
percentage Column 2 represents and Column 4 is what benfords law expects.
So the closer Columns 3 and 4 are the more your numbers conform to Benfords
law.

Remarks
-------

benford just presents the measurements in a form which makes it easy to inspect.
Both knowing whether your variable should conform to Benford's law or not and whether
the results suggest your dataset is authentic or rigged is up to you. The author is happy
to point the user to N. J. Cox's firstdigit module for a more comprehensive treatment
as well as acknowledge a masterful rewrite of the first - a more pedestrian - version.





Examples
--------
While developing I played with auto.dta which is both too small and contains no
variables which should conform to Benford's law. So to just see it work you can do:


. sysuse auto.dta
. benford price


The dataset http://www.stata-press.com/data/r9/census6.dta contains variables which
are suitable for Benford's Law. Although it is too small to get any reliable
distribution it still shows a relative conformity.


.   use http://www.stata-press.com/data/r9/census6.dta
.   benford pop

will return:

Digit     Count   Frequency       Benford
-----------------------------------------
1         10      20.00           30.10   
2         8       16.00           17.60   
3         5       10.00           12.50   
4         10      20.00           9.70   
5         7       14.00           7.90   
6         2       4.00            6.70   
7         2       4.00            5.80   
8         1       2.00            5.10   
9         6       12.00           4.60   
------------------------------------------




Author
------
Dr Nikos Askitas, IZA, Bonn, Germany.
Email: nikos@iza.org
已有 1 人评分经验 收起 理由
np84 + 100 精彩帖子

总评分: 经验 + 100   查看全部评分

报纸
wdjjok 发表于 2017-4-1 14:39:38
蓝色 发表于 2017-4-1 12:21
自己下载安装

help for benford                             (Nikos Askitas)
谢谢啦~~~找到了~

地板
wdjjok 发表于 2017-4-1 14:39:43
蓝色 发表于 2017-4-1 12:21
自己下载安装

help for benford                             (Nikos Askitas)
谢谢啦~~~找到了~

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

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