How do you predict probability of an outcome occurring by years in R?

Hello All!

I am new to R and I am trying to learn how to predict probability in R.

For instance, say if the task was to predict the probability of an employee leaving the firm for the next 5 years. which package would I use and what would be the proper syntax?

Hi, what sort of data are you using to predict the probability of an employee leaving? Perhaps use something like logistic regression?

How to Use predict() with Logistic Regression Model in R - Statology

1 Like

Thank you for your reply! I am not sure which data I will use. I am trying to create some case studies for a personal portfolio showing different ways R can be used for analysis in different industries.

One example that was mentioned was in an HR industry role, predicting employee attrition.

I have the data type now. I have the employee staff count by month per year.

I found a useful YouTube tutorial that assists with this project. I noticed that I may not have the right type of data. In order to calculate Attrition in R your employee data must include

each staff member's start date +
end date +
any variable that may have affected their decision to voluntarily leave the company. (Typically this data is collected in survey form. )

How To Calculate Monthly Turnover Using R

Yeah, you could fit a survival analysis model. RPubs - Survival Analysis on Employee Attrition

1 Like

Awesome, I will try this one out. 1st I have to choose a better dataset or create a fictional one with a start and end date to better solve for the predictive analysis. Thank you!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.