iangow / activist_director

1 stars 0 forks source link

Re-do splits by affiliated/unaffiliated #56

Closed iangow closed 6 years ago

iangow commented 6 years ago

@sapyung Today @surajsrinivasan and I met to discuss the paper, which I've been working on for the last couple of days. I think we mostly need to do some work on the writing.

One thing we had done is to add more about the activist directors. including a table on voting and a table on "career outcomes". In these tables and the descriptive statistics, we see some evidence that affiliated and unaffiliated activist directors differ in key ways.

@surajsrinivasan suggested that this might be a good partition to explore in later analyses. But most of these are at the level of events, rather than directors. But I think we could classify events as affiliated if at least one activist director is affiliated and unaffiliated if none of them are. We already have the data organized to calculate these categories pretty easily (see below).

This should not be too difficult. Is this something you could look at soon? Because I have made many edits to the code, make sure to pull my code (git pull --rebase=preserve) before starting on this.

library(dplyr, warn.conflicts = FALSE)
library(DBI)
library(ggplot2)

pg <- dbConnect(RPostgreSQL::PostgreSQL())

rs <- dbGetQuery(pg, "SET work_mem='8GB'")
rs <-  dbGetQuery(pg, "SET search_path TO activist_director")

activism_events <- tbl(pg, "activism_events")
activist_directors <- tbl(pg, "activist_directors")

plot_data <-
    activism_events %>%
    filter(activist_director) %>%
    mutate(prop_affiliate = num_affiliate_directors*1.0/num_activist_directors) %>%
    select(num_activist_directors, prop_affiliate) %>%
    collect()

plot_data %>% 
    ggplot(aes(x=prop_affiliate)) +
    geom_histogram()
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
#> Warning: Removed 27 rows containing non-finite values (stat_bin).


plot_data %>% 
    ggplot(aes(x=num_activist_directors)) +
    geom_histogram()
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
#> Warning: Removed 27 rows containing non-finite values (stat_bin).

Created on 2018-09-06 by the reprex package (v0.2.0).

sapyung commented 6 years ago

@iangow I tried to generate tables for the affiliated analysis, but it has errors at the end: Underfull \hbox (badness 10000) in alignment at lines 255--255 Can you quickly help me with this? Please refer to table_outcomes_affil.Rnw.

iangow commented 6 years ago

Fixed. That wasn't the issue. You had underscores floating about, which causes problems with LaTeX.

As a rule, the "copy the files with slightly different name and start editing" approach to things is not a good idea when you have real version control. It's much easier to see what you're doing if you incrementally edit the files that are there ... it is easy to go back to prior versions.

I think splitting the analysis in this way is a good call, as we are seeing multiple differences between affiliated and unaffliated activist directors.

iangow commented 6 years ago

Here is the commit that fixed the issue. I made a few other edits too (including putting the edits in the "main" files).

iangow commented 6 years ago

@sapyung It might be easiest to just tweak the "activism category" variable so that it has the levels we want ("Affiliated activist director", "Unaffiliated activist director" and "Other activism") rather than creating a whole new variable and having to modify a lot of code.

There are other analyses that could be redone with this new split. I would recommend doing them one at a time (even using multiple commits for each if there are natural chunks to the effort) and perhaps in this order so we can decide how far we want to push this. But if there continues to be a "story" with this split, I think it's a good one (anything that emphasizes the activist directors themselves separates us from other papers out there ... I feel we should be able to turn this into the JFE that targeted so nearly was).

sapyung commented 6 years ago

@iangow I have updated the Returns and ROA analyses with the affiliated split. But there is an issue with LaTeX for roa_table.Rnw Can you help me with this please?

iangow commented 6 years ago

It seems you'd fixed it. I removed the columns for activist-director-versus-activism analyses, as I think we are OK with just the three new columns.

sapyung commented 6 years ago

I have made changes to all of the following tables: