当前位置:网站首页>How to calculate the Gini coefficient in R (with examples)
How to calculate the Gini coefficient in R (with examples)
2022-06-22 20:53:00 【Mrrunsen】
Italian statisticians Corrado Gini name , The Gini coefficient is a measure of income distribution .
The value of Gini coefficient is 0 To 1 Between , The higher the value, the greater the income inequality , among :
0 On behalf of full income equality ( Everyone has the same income )
1 Represents total income inequality ( One person has all the income )
You can find by country... Here / List of Gini coefficients listed by Region .
The following example shows the use of DescTools In bag Gini() Function calculation R Two methods of Gini coefficient in .
Example 1: Use personal income to calculate Gini coefficient
Suppose we have the following 10 Personal annual income list :
income :5 Thousands of dollars 、5 Thousands of dollars 、7 Thousands of dollars 、7 Thousands of dollars 、7 Thousands of dollars 、9 Thousands of dollars 、15 Thousands of dollars 、15 Thousands of dollars 、15 Thousands of dollars 、15 Thousands of dollars
The following code shows how to use Gini() Function to calculate the Gini coefficient of the population :
library(DescTools)
#define vector of incomes
x <- 边栏推荐
- Scheduling with Testing
- 软件上线前为什么要做性能测试?软件性能测试机构怎么找
- Three dimensional world helps the laboratory to consolidate the complete quality system management
- MySQL中如何计算同比和环比
- 慕课6、实现负载均衡-Ribbon
- 73-找到业务高峰时段的sql示例(报表开发类)
- ROS from entry to mastery (VIII) common sensors and message data
- Software testing - Test Case Design & detailed explanation of test classification
- 跨域 CORS/OPTIONS
- Introduction of neural network (BP) in Intelligent Computing
猜你喜欢

Three dimensional world helps the laboratory to consolidate the complete quality system management

【Proteus仿真】74LS138译码器流水灯

已解决:一个表中可以有多个自增列吗

Security policy and NAT (easy IP) of firewall Foundation

An IPFs enabled email - skiff

Introduction of neural network (BP) in Intelligent Computing

Introduction to async profiler

R语言 co2数据集 可视化

Overview of common loss functions for in-depth learning: basic forms, principles and characteristics
Code to Image Converter | 代码生成漂亮图片工具
随机推荐
[deeply understand tcapulusdb technology] create a game zone
Overview of common loss functions for in-depth learning: basic forms, principles and characteristics
天,靠八股文逆袭了啊
讲真,Kotlin 协程的挂起没那么神秘(原理篇)
CVPR 2022 oral | video text pre training new SOTA, HKU and Tencent arc lab launched excuse task based on multiple-choice questions
Oh, my God, it's a counter attack by eight part essay
Code to Image Converter | 代码生成漂亮图片工具
Cloud computing in the metauniverse to enhance your digital experience
启牛送的券商账户是安全的吗?启牛提供的券商账户是真的?
Raspberry pie environment settings
密码学系列之:PKI的证书格式表示X.509
MySQL基础——函数
Dynamicdatabasesource, which supports the master-slave database on the application side
87-with as写法的5种用途
Summary of 2019: 31 is just another start
让知识付费系统视频支持M3U8格式播放的方法
Introduction to async profiler
Several common MySQL commands
[observation] innovation in the software industry has entered a "new cycle". How can we make a new start in the changing situation?
极客星球 | 业务监控及告警系统体系化建设之路