juliasilge / juliasilge.com

My blog, built with blogdown and Hugo :link:
https://juliasilge.com/
42 stars 28 forks source link

Estimate change in #TidyTuesday CEO departures with bootstrap resampling | Julia Silge #25

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

Estimate change in #TidyTuesday CEO departures with bootstrap resampling | Julia Silge

Are more CEO departures involuntary now than in the past? We can use tidymodels' bootstrap resampling and generalized linear models to understand change over time.

https://juliasilge.com/blog/ceo-departures/

matthh9797forecast commented 3 years ago

Brilliant video, explains bootstrapping very clearly, thankyou

mwilson19 commented 3 years ago

Julia! Tidymodels needs a cheat sheet on Rstudio !

conlelevn commented 2 years ago

@juliasilge Hi Julia, lets say we gonna use Linear regression model instead of Logis model for this case, after using bootstrap method to find a best model, do we need to care about testing error term for this model? (like heteroskedasticity, autocorelation...)

conlelevn commented 2 years ago

BTW: its interesting that, in EDA we have seen the trend of Number of CEO departures of "other" was decreasing, hence I expect there is a negative relationship between this Number and fyear but some how the coefficient told us the other way around.

juliasilge commented 2 years ago

@conlelevn One of the reasons that people use bootstrap resampling to measure things (like the slope, etc) is that it is more robust, meaning that, for example, the assumptions of OLS breaking down somewhat for your data typically don't have much impact. There's lots of papers exploring how/when this is true, if you are interested in learning more!

RaymondBalise commented 1 year ago

If anybody is looking for the magic to match the order of the legend with the lines in the plot ... just add this before the ggplot() call:

mutate(involuntary = fct_reorder2(involuntary, fyear, n)) %>%

Neal Grantham has a lovely explanation of fct_reorder2() which you can find here: https://www.nsgrantham.com/reorder-legend-ggplot2