首页 > 编程知识 正文

数据分析:企业人力资源管理探索

时间:2023-05-03 07:51:02 阅读:269720 作者:1337

数据分析:企业员工流失(一)

本文借鉴自公众号:R语言中文社区 Joffy Zhong所作的数据分析实例。

1.相关说明 数据集:SAMPLE DATA: HR Employee Attrition and Performance分析语言:R涉及邻域:人力资源管理,员工流失问题 2.数据分析过程 2.1 数据集

该数据集由(1470,35)组成,本文重点关注的具体各列属性值如下图。

2.2 数据分析流程 数据初步探索探索基础信息Gender,Age,Department,JobLevel,Education等变量与员工流失的关系探索收入、投入等变量与员工流失的关系探索员工优先认股权,涨薪,升职等变量与员工流失关系探索与满意度相关的变量与员工流失的关系探索工作和生活平衡相关的变量与员工流失的关系 2.3 具体分析过程

2.3.1 数据初步探索

#加载数据并初步探索Attr.df <- read.csv("D:/R/Rcodes/data/HR-Employee-Attrition.csv",header = TRUE)str(Attr.df)summary(Attr.df)



结论:
- 离职员工:非离职员工=1:5
- 企业员工平均年龄为37岁
- 企业男女比例约为1:1.5
- 企业员工收入平均值为6503美元,中值为4919美元

2.3.2 探索Gender,Age,Department,JobLevel,Education等变量与员工流失的关系 g1 <- ggplot(Attr.df, aes(x = Age, fill = Attrition)) + geom_density(alpha = 0.7)g2 <- ggplot(Attr.df, aes(x = NumCompaniesWorked, fill = Attrition)) + geom_density(alpha = 0.7)g3 <- ggplot(Attr.df, aes(x = YearsAtCompany, fill = Attrition)) + geom_density(alpha = 0.7)g4 <- ggplot(Attr.df, aes(x = TotalWorkingYears, fill = Attrition)) + geom_density(alpha = 0.7)grid.arrange(g1, g2, g3, g4, ncol = 2, nrow = 2)


结论:

离职员工的年龄普遍趋于30岁以下频繁跳槽的员工(离职次数多于5次的)更容易离职在企业时间超过5年,则员工的离职率明显降低

职业生涯低于10年的员工离职倾向更大

在此推测,由于年轻的员工更倾向于多尝试,且对未来目标相对迷茫,高流失率也意味着此类员工难以在短期形成对企业价值观的长期认同。因此企业应多关注年轻员工,传播企业文化,加强员工的归属感和认同感。

g5 <- ggplot(Attr.df, aes(x= Gender,fill = Attrition)) + geom_bar(position = "fill") + labs(y="Percentage") + scale_y_continuous(labels=percent)g6 <-ggplot(Attr.df, aes(x= JobLevel,fill = Attrition)) + geom_bar(position = "fill") + labs(y="Percentage") + scale_y_continuous(labels=percent)g7 <- ggplot(Attr.df, aes(x= Education,fill = Attrition)) + geom_bar(position = "fill") + labs(y="Percentage") + scale_y_continuous(labels=percent) g8 <- ggplot(Attr.df, aes(x= Department,fill = Attrition)) + geom_bar(position = "fill") + labs(y="Percentage") + scale_y_continuous(labels=percent)grid.arrange(g5, g6, g7, g8, ncol = 2, nrow = 2)


结论:

性别以及受教育程度与员工离职无明显的关系低等级职位的员工更容易流失

在企业的各部门中,销售部门的员工离职率更高

在此推测,企业应多关注一线的销售人员,深入了解该部门的人员制度安排以及福利水平。

2.3.3 探索收入、投入等变量与员工流失的关系 g9 <- ggplot(Attr.df, aes(x = MonthlyIncome, fill = Attrition)) + geom_density(alpha = 0.7) g10 <- ggplot(Attr.df, aes(x= JobInvolvement, group=Attrition)) + geom_bar(aes(y = ..prop.., fill = Attrition), stat="count", alpha = 0.7,position = "identity",color="black") + labs(y="Percentage") + scale_y_continuous(labels=percent)grid.arrange(g9, g10, ncol = 2)


结论:

非常明显的是,工资越低的员工离职所占比率更大,并且在10000美元的位置也出现了离职率较高的情况

工作投入高的员工离职可能性更高

在此推测,企业底层的员工由于工资低,流动性更大;相对于10000美元的企业高管精英,有可能是为了追求更大的平台而出现跳槽的情形,这类员工往往会影响企业的正常发展,因此企业应重点关注,及时了解其动态及需求。

ggplot(Attr.df, aes(x= JobInvolvement, y=MonthlyIncome, group = JobInvolvement)) + geom_boxplot(aes(fill = factor(..x..)),alpha=0.7) + theme(legend.position="none",plot.title = element_text(hjust = 0.5)) + facet_grid(~Attrition) + ggtitle("Attrition")


结论:
投入与回报差异较大的,越容易流失,因此企业更需要关注那些投入多但回报少的员工,这类员工也许不是不努力,而是没有掌握正确的工作方式,应当给予更大的帮助,例如培训,工作指导等;薪资往往是回报的其中一种。

2.3.4 探索员工优先认股权,涨薪,升职等变量与员工流失关系 g11 <- ggplot(Attr.df, aes(x = PercentSalaryHike, fill = Attrition)) + geom_density(alpha = 0.7) g12 <- ggplot(Attr.df, aes(x= TrainingTimesLastYear, group=Attrition)) + geom_bar(aes(y = ..prop.., fill = Attrition), stat="count", alpha = 0.7,position = "identity",color="black") + labs(y="Percentage") + scale_y_continuous(labels=percent) g13 <- ggplot(Attr.df, aes(x = YearsSinceLastPromotion, fill = Attrition)) + geom_density(alpha = 0.7) g14 <- ggplot(Attr.df, aes(x= StockOptionLevel, group=Attrition)) + geom_bar(aes(y = ..prop.., fill = Attrition), stat="count", alpha = 0.7,position = "identity",color="black") + labs(y="Percentage") + scale_y_continuous(labels=percent) grid.arrange(g11, g12, g13, g14, ncol = 2)


结论:

加薪,培训以及升职等对员工流失并未有明显影响拥有员工优先认股权的员工较为稳定,不容易轻易离职
在此推测,加薪、培训、和升职对员工影响不大,员工优先认股权对于员工来源是更为有效的手段,有认股权的员工相对来说较稳定,将企业利益与员工个人利益捆绑在一起,能使员工有归属感。 2.3.5 探索与满意度相关的变量与员工流失的关系 g15 <- ggplot(Attr.df, aes(x= JobSatisfaction, group=Attrition)) + geom_bar(aes(y = ..prop.., fill = Attrition), stat="count", alpha = 0.7,position = "identity",color="black") + labs(y="Percentage") + scale_y_continuous(labels=percent) g16 <- ggplot(Attr.df, aes(x= RelationshipSatisfaction, group=Attrition)) + geom_bar(aes(y = ..prop.., fill = Attrition), stat="count", alpha = 0.7,position = "identity",color="black") + labs(y="Percentage") + scale_y_continuous(labels=percent) g17 <- ggplot(Attr.df, aes(x= EnvironmentSatisfaction, group=Attrition)) + geom_bar(aes(y = ..prop.., fill = Attrition), stat="count", alpha = 0.7,position = "identity",color="black") + labs(y="Percentage") + scale_y_continuous(labels=percent) grid.arrange(g15, g16, g17, ncol = 2)


结论:很明显满意度低的员工离职率更高。

2.3.6 探索工作和生活平衡相关的变量与员工流失的关系 g18 <- g20 <- ggplot(Attr.df, aes(x= OverTime, group=Attrition)) + geom_bar(aes(y = ..prop.., fill = Attrition), stat="count", alpha = 0.7,position = "identity",color="black") + labs(y="Percentage") + scale_y_continuous(labels=percent) g19 <- ggplot(Attr.df, aes(x= WorkLifeBalance, group=Attrition)) + geom_bar(aes(y = ..prop.., fill = Attrition), stat="count", alpha = 0.7,position = "identity",color="black") + labs(y="Percentage") + scale_y_continuous(labels=percent) g20 <- ggplot(Attr.df, aes(x= BusinessTravel, group=Attrition)) + geom_bar(aes(y = ..prop.., fill = Attrition), stat="count", alpha = 0.7,position = "identity",color="black") + labs(y="Percentage") + scale_y_continuous(labels=percent) g21 <- ggplot(Attr.df, aes(x = DistanceFromHome, fill = Attrition)) + geom_density(alpha = 0.7)


结论:

经常加班的员工相对于不加班的员工流失率非常高认为工作与生活平衡水平为1的员工流失率较高频繁出差的员工流失率较高高距离家较远的员工流失率较高

在此推测,工作与生活的平衡这一类因素对员工流失的影响较为严重,经常加班,出差以及离家较远都会造成员工离职,因此企业应更加人性化管理,提高工作效率,避免加班等问题。

数据分析:企业人力资源管理探索(未完待续)

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。