---
title: "Paper Replication: Lemmon, Roberts, and Zender (2008)"
author: "Emanuele Guidotti"
output: rmdformats::readthedown
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, warning = FALSE, message = FALSE, cache = TRUE)
options(knitr.kable.NA = '')
library(sjPlot)
library(table1)
```

The goal of this exercise is to replicate some of the results in [Lemmon, Roberts, and Zender (2008)](http://www.uh.edu/~bsorense/LemmonRobertsZender.pdf) using the [R programming language](https://www.r-project.org/).

```{r}
# load required packages
library(ggplot2)
library(tidyverse)
library(plm)
library(car)
```

# Data Acquisition

The sample consists of all nonfinancial firms in the Compustat database from 1965 to 2003. To avoid Compustat data disclosure and to simplify data acquisition, the following [csv file](https://storage.googleapis.com/emanueleguidotti/data/Lemmon-Roberts-Zender-2008.csv) can be used. 
The file contains all the variables required for the analysis in [Lemmon, Roberts, and Zender (2008)](http://www.uh.edu/~bsorense/LemmonRobertsZender.pdf), constructed following the authors' methodology described in the paper's appendix. Data are already winsorized.
```{r}
# importing data in R
data <- read.csv('https://storage.googleapis.com/emanueleguidotti/data/Lemmon-Roberts-Zender-2008.csv')
```


# Table I: Summary Statistics

First replicate _Table I: Summary Statistics_. \
Make sure we are using the same data used in the paper.

```{r, echo = FALSE}
table1::table1(~BookLeverage + MarketLeverage + LogSales + MarketToBook + Profitability + Tangibility + CashFlowVol + MedianIndBookLev + DividendPayer + IntangibleAssets, data = data, footnote = "The sample consists of all nonfinancial firms in the Compustat database from 1965 to 2003. The table presents summary statistics for the entire sample (All Firms). Variable definitions are provided in the Paper Appendix. ")
```

\

The dataset is pretty similar to the one used in the original paper. Note: the authors are constructing the _Cash Flow Volatility_ variable on a rolling basis as the standard deviation of historical operating income, requiring at least 3 years of data (3 observations). This means that the early _Cash Flow Volatility_ is affected by a huge uncertainty and its usage in the analysis is controversial (estimating a standard deviation using only 3 observations makes little sense).


# Figure I: The Evolution of Leverage

We begin our analysis by studying the evolution of leverage for our cross section of firms. Figure 1 presents the average leverage ratios of four portfolios in "event time." The figure is constructed in the following manner. Each calendar year, we sort firms into quartiles (i.e., four portfolios) according to their leverage ratios, which we denote: Very High, High, Medium, and Low. The portfolio formation year is denoted event year 0. We then compute the average leverage for each portfolio in each of the previous and subsequent years, holding the port folio composition constant. We repeat these two steps of sorting and averaging for every year in the sample period. This process generates 39 sets of event-time averages, one for each calendar year in our sample. We then compute the average leverage of each portfolio across the 39 sets within each event year. We perform this exercise for both book leverage and market leverage. 

```{r}
# cleaning data
sample <- data %>%
  select(ENTITY, DATE, BookLeverage, MarketLeverage) %>%
  na.omit()

# create portfolios for each date (LOW, MEDIUM, HIGH, VERY HIGH leverage)
portfolios <- 
  sample %>% 
  group_by(DATE) %>%
  mutate(Q.BookLeverage = ntile(BookLeverage, 4), Q.MarketLeverage = ntile(MarketLeverage, 4)) 

# get average book leverage by portfolio at event time
book <- 
  portfolios %>%
  # for each portfolio at a given date
  group_by(Q.BookLeverage, DATE) %>% 
  do(
    summarise(
      # get portfolio's entities and for each future/past date...
      sample[sample$ENTITY %in% .$ENTITY,] %>% group_by(DATE),
      # ...compute the lag between such date and the current date (portfolio creation)
      date = DATE[1] - .$DATE[1],
      # ...get the average leverage at such date
      m = mean(BookLeverage)
    )
  ) %>%
  # for each portfolio at event time
  group_by(Q.BookLeverage, date) %>%
  # get summary statistics
  summarise(sd = sd(m), m = mean(m), n = n())

# get average book leverage by portfolio at event time
market <- 
  portfolios %>%
  # for each portfolio at a given date
  group_by(Q.MarketLeverage, DATE) %>% 
  do(
    summarise(
      # get portfolio's entities and for each future/past date...
      sample[sample$ENTITY %in% .$ENTITY,] %>% group_by(DATE),
      # ...compute the lag between such date and the current date (portfolio creation)
      date = DATE[1] - .$DATE[1],
      # ...get the average leverage at such date
      m = mean(MarketLeverage)
    )
  ) %>%
  # for each portfolio at event time
  group_by(Q.MarketLeverage, date) %>%
  # get summary statistics
  summarise(sd = sd(m), m = mean(m), n = n())

```

Results are presented as solid lines in the following picture. The dashed lines surrounding the portfolio averages represent 95% confidence intervals.

```{r, fig.width = 12, fig.align = "center"}
# Book Leverage Plot
ggplot(book, aes(x=date, y=m, colour=Q.BookLeverage)) + 
  geom_ribbon(data=book[book$Q.BookLeverage==1,], aes(x = date, ymin = m-2*sd/sqrt(n), ymax = m+2*sd/sqrt(n), fill = Q.BookLeverage), inherit.aes = FALSE, alpha=0.3) +
  geom_ribbon(data=book[book$Q.BookLeverage==2,], aes(x = date, ymin = m-2*sd/sqrt(n), ymax = m+2*sd/sqrt(n), fill = Q.BookLeverage), inherit.aes = FALSE, alpha=0.3) +
  geom_ribbon(data=book[book$Q.BookLeverage==3,], aes(x = date, ymin = m-2*sd/sqrt(n), ymax = m+2*sd/sqrt(n), fill = Q.BookLeverage), inherit.aes = FALSE, alpha=0.3) +
  geom_ribbon(data=book[book$Q.BookLeverage==4,], aes(x = date, ymin = m-2*sd/sqrt(n), ymax = m+2*sd/sqrt(n), fill = Q.BookLeverage), inherit.aes = FALSE, alpha=0.3) +
  geom_line(aes(group=Q.BookLeverage)) +
  geom_point(size=3) +
  scale_fill_continuous(name = '', labels = c('LOW', 'MEDIUM', 'HIGH', 'VERY HIGH')) +
  scale_colour_continuous(guide = FALSE) +
  ggtitle('Book Leverage')
```

```{r, fig.width = 12, fig.align = "center"}
# Market Leverage Plot
ggplot(market, aes(x=date, y=m, colour=Q.MarketLeverage)) + 
  geom_ribbon(data=market[market$Q.MarketLeverage==1,], aes(x = date, ymin = m-2*sd/sqrt(n), ymax = m+2*sd/sqrt(n), fill = Q.MarketLeverage), inherit.aes = FALSE, alpha=0.3) +
  geom_ribbon(data=market[market$Q.MarketLeverage==2,], aes(x = date, ymin = m-2*sd/sqrt(n), ymax = m+2*sd/sqrt(n), fill = Q.MarketLeverage), inherit.aes = FALSE, alpha=0.3) +
  geom_ribbon(data=market[market$Q.MarketLeverage==3,], aes(x = date, ymin = m-2*sd/sqrt(n), ymax = m+2*sd/sqrt(n), fill = Q.MarketLeverage), inherit.aes = FALSE, alpha=0.3) +
  geom_ribbon(data=market[market$Q.MarketLeverage==4,], aes(x = date, ymin = m-2*sd/sqrt(n), ymax = m+2*sd/sqrt(n), fill = Q.MarketLeverage), inherit.aes = FALSE, alpha=0.3) +
  geom_line(aes(group=Q.MarketLeverage)) +
  geom_point(size=3) +
  scale_fill_continuous(name = '', labels = c('LOW', 'MEDIUM', 'HIGH', 'VERY HIGH')) +
  scale_colour_continuous(guide = FALSE) +
  ggtitle('Market Leverage')

```

We can see that the leverage of all portfolios tends to converge as time goes and that the dispersion is maximum at time 0 (portfolio creation date). Remarkably, the leverage tends to converge also in the past looking at the average leverage of the portfolio before it was selected. The quantile-based portfolio selection captures short-term dispersion only, which mitigates in the long run. Firms' leverage is not constant over time but tend to adjust in the long run towards an equilibrium level between 20\%-40\%.


# Table II: The Role of Initial Leverage

One implication of the permanent component of leverage revealed by the previous figures is that firms' future leverage ratios are closely related to their initial leverage ratios. However, the figures provide limited quantitative evi dence of initial leverage ratios' economic importance. To measure the impact of initial leverage on future leverage, we estimate the following regression.
$$Leverage_{i,t} = \alpha + \beta X_{i,t-1} + \gamma Leverage_{i,0} + \nu_t + \epsilon_{i,t}$$
where $i$ indexes firms; $t$ indexes years; $X$ is a set of 1-year lagged control vari ables; $Leverage_{i,0}$is firm $i$'s initial leverage, which we proxy for with the first nonmissing value for leverage; $\nu$ is a year fixed effect; and $\epsilon$ is a random error term assumed to be possibly heteroskedastic and correlated within firms (Petersen (2007)).
To avoid an identity at time zero, we drop the first observation for each firm from the regression. The coefficient of interest is $\gamma$, which measures the importance of firms' initial leverage values in determining future values of leverage.


```{r}
# add initial leverage
sample <- na.omit(data) %>%
  group_by(ENTITY) %>%
  mutate(
   InitialBookLeverage = BookLeverage[which.min(DATE)], 
   InitialMarketLeverage = MarketLeverage[which.min(DATE)],
   isFirst = DATE==min(DATE)
  ) %>%
  ungroup()

# lag variables and build panel data
pdf <- pdata.frame(sample, index = c('ENTITY', 'DATE'))
for(i in colnames(pdf)) pdf[,paste0('Lag', i)] <- lag(pdf[,i], 1)

# drop fist observation and clean data
pdf <- na.omit(pdf[pdf$isFirst == FALSE, ])

# utility function: linear regression and scale estimates (according to the paper)
lm.scale <- function(y, x, data, effect = NULL){
  f <- as.formula(paste0(y, ' ~ ', paste0(x , collapse = '+')))
  if(is.null(effect)) m <- lm(f, data = data)
  else m <- plm(f, data = pdf, model = 'within', effect = effect)
  m$coefficients[x] <- m$coefficients[x] * sapply(x, function(x) sd(data[,x]))
  return(m)
}

# Book Leverage
m1 <- lm.scale(y = 'BookLeverage', 
               x = 'InitialBookLeverage', 
               data = pdf)
m2 <- lm.scale(y = 'BookLeverage', 
               x = c('InitialBookLeverage', 
                     'LagLogSales', 
                     'LagMarketToBook', 
                     'LagProfitability', 
                     'LagTangibility'), 
               data = pdf, 
               effect = 'time')
m3 <- lm.scale(y = 'BookLeverage', 
               x = c('InitialBookLeverage', 
                     'LagLogSales', 
                     'LagMarketToBook', 
                     'LagProfitability', 
                     'LagTangibility', 
                     'LagMedianIndBookLev', 
                     'LagCashFlowVol', 
                     'LagDividendPayer'), 
               data = pdf, 
               effect = 'time')

# Market Leverage
m4 <- lm.scale(y = 'MarketLeverage', 
               x = 'InitialMarketLeverage', 
               data = pdf)
m5 <- lm.scale(y = 'MarketLeverage', 
               x = c('InitialMarketLeverage', 
                     'LagLogSales', 
                     'LagMarketToBook', 
                     'LagProfitability', 
                     'LagTangibility'), 
               data = pdf, 
               effect = 'time')
m6 <- lm.scale(y = 'MarketLeverage', 
               x = c('InitialMarketLeverage', 
                     'LagLogSales', 
                     'LagMarketToBook', 
                     'LagProfitability', 
                     'LagTangibility', 
                     'LagMedianIndBookLev', 
                     'LagCashFlowVol', 
                     'LagDividendPayer'), 
               data = pdf, 
               effect = 'time')


# plot estimates
tab_model(m1, m4, m2, m5, m3, m6, 
          show.intercept = F, 
          digits = 2, 
          show.ci = F, 
          collapse.se = T, 
          p.style = 'asterisk', 
          dv.labels = c('Book', 'Market', 'Book', 'Market', 'Book', 'Market')) 
```


# Table III: Variance Decomposition of Leverage

We now turn to a parametric framework, analysis of covariance (ANCOVA), which enables us to decompose the variation in leverage attributable to different factors. We do so by estimating the following model of leverage.
$$Leverage_{i,t}=\alpha + \beta X_{i,t-1} + \eta_i + \nu_t + \epsilon_{i,t}$$
where $\eta$ is a firm fixed effect and the other variables are as defined in the previuos equation.
Because of the large number of firms in the panel and computer memory limitations, performing the variance decomposition on the entire sample is infeasible. As such, the authors randomly sample 10\% of the firms in the panel and perform the analysis on this subsample.

```{r}
# sub sample 10% firms
set.seed(123)
firms <- unique(data$ENTITY)
firms <- sample(firms, size = as.integer(length(firms)/10), replace = F)
pdf.sample <- pdf %>% filter(ENTITY %in% firms)

# utility function: anova analysis and scale according to the paper
anova.scale <- function(y, x, data){
  f <- as.formula(paste0(y, ' ~ ', paste0(x , collapse = '+')))
  m <- lm(f, data = data)
  r2 <- summary(m)$adj.r.squared
  a <- Anova(m, type = 3)
  a <- a[,1,drop=F]
  a <- head(tail(a, -1), -1)
  a <- a/sum(a)
  i <- rbind(a, Adj.R2 = r2)
  return(i)
}

# Book Leverage
m1 <- anova.scale(y = 'BookLeverage', 
                  x = 'factor(ENTITY)', 
                  data = pdf.sample)
m2 <- anova.scale(y = 'BookLeverage', 
                  x = 'factor(DATE)', 
                  data = pdf.sample)
m3 <- anova.scale(y = 'BookLeverage', 
                  x = c('factor(ENTITY)',
                        'factor(DATE)'), 
                  data = pdf.sample)
m4 <- anova.scale(y = 'BookLeverage', 
                  x = c('factor(DATE)', 
                        'LagLogSales', 
                        'LagMarketToBook', 
                        'LagProfitability', 
                        'LagTangibility', 
                        'factor(sic)'), 
                  data = pdf.sample)
m5 <- anova.scale(y = 'BookLeverage', 
                  x = c('factor(ENTITY)', 
                        'factor(DATE)', 
                        'LagLogSales', 
                        'LagMarketToBook', 
                        'LagProfitability', 
                        'LagTangibility'), 
                  data = pdf.sample)
m6 <- anova.scale(y = 'BookLeverage', 
                  x = c('factor(DATE)', 
                        'LagLogSales', 
                        'LagMarketToBook', 
                        'LagProfitability', 
                        'LagTangibility', 
                        'LagMedianIndBookLev', 
                        'LagCashFlowVol', 
                        'LagDividendPayer', 
                        'factor(sic)'), 
                  data = pdf.sample)
m7 <- anova.scale(y = 'BookLeverage', 
                  x = c('factor(ENTITY)', 
                        'factor(DATE)', 
                        'LagLogSales', 
                        'LagMarketToBook', 
                        'LagProfitability', 
                        'LagTangibility', 
                        'LagMedianIndBookLev', 
                        'LagCashFlowVol', 
                        'LagDividendPayer'), 
                  data = pdf.sample)

# Market Leverage
m8 <- anova.scale(y = 'MarketLeverage', 
                  x = 'factor(ENTITY)', 
                  data = pdf.sample)
m9 <- anova.scale(y = 'MarketLeverage', 
                  x = 'factor(DATE)', 
                  data = pdf.sample)
m10 <- anova.scale(y = 'MarketLeverage', 
                  x = c('factor(ENTITY)',
                        'factor(DATE)'), 
                  data = pdf.sample)
m11 <- anova.scale(y = 'MarketLeverage', 
                  x = c('factor(DATE)', 
                        'LagLogSales', 
                        'LagMarketToBook', 
                        'LagProfitability', 
                        'LagTangibility', 
                        'factor(sic)'), 
                  data = pdf.sample)
m12 <- anova.scale(y = 'MarketLeverage', 
                  x = c('factor(ENTITY)', 
                        'factor(DATE)', 
                        'LagLogSales', 
                        'LagMarketToBook', 
                        'LagProfitability', 
                        'LagTangibility'), 
                  data = pdf.sample)
m13 <- anova.scale(y = 'MarketLeverage', 
                  x = c('factor(DATE)', 
                        'LagLogSales', 
                        'LagMarketToBook', 
                        'LagProfitability', 
                        'LagTangibility', 
                        'LagMedianIndBookLev', 
                        'LagCashFlowVol', 
                        'LagDividendPayer', 
                        'factor(sic)'), 
                  data = pdf.sample)
m14 <- anova.scale(y = 'MarketLeverage', 
                  x = c('factor(ENTITY)', 
                        'factor(DATE)', 
                        'LagLogSales', 
                        'LagMarketToBook', 
                        'LagProfitability', 
                        'LagTangibility', 
                        'LagMedianIndBookLev', 
                        'LagCashFlowVol', 
                        'LagDividendPayer'), 
                  data = pdf.sample)
```

## Variance Decomposition: Book Leverage

```{r, echo = FALSE}
# Merge Book Models
m <- merge(m1, m2, all = T, by = 'row.names'); rownames(m) <- m[,1]; m[,1] <- NULL
m <- merge(m , m3, all = T, by = 'row.names'); rownames(m) <- m[,1]; m[,1] <- NULL
m <- merge(m , m4, all = T, by = 'row.names'); rownames(m) <- m[,1]; m[,1] <- NULL
m <- merge(m , m5, all = T, by = 'row.names'); rownames(m) <- m[,1]; m[,1] <- NULL
m <- merge(m , m6, all = T, by = 'row.names'); rownames(m) <- m[,1]; m[,1] <- NULL
m <- merge(m , m7, all = T, by = 'row.names'); rownames(m) <- m[,1]; m[,1] <- NULL

# Formatting
colnames(m) <- c(LETTERS[1:ncol(m)])
rownames(m) <- gsub('factor(ENTITY)', 'Firm FE', rownames(m), fixed = T)
rownames(m) <- gsub('factor(DATE)', 'Year FE', rownames(m), fixed = T)
rownames(m) <- gsub('factor(sic)', 'Industry FE', rownames(m), fixed = T)

# Plot
knitr::kable(m, digits = 2, align = 'c', caption = 'The majority of the total variation in capital structure is due to time
invariant factors: Firm and Industry Fixed Effects. Note: the models including firm and/or industry effects estimate more than 1000 parameters (one dummy for each firm and/or industry). Given the reduced sample size of about 20.000 observations, this means one parameter every 20 observation. It is not surprising that firm and/or industry fixed effects explain the majority of variance in the model. Overfitting.')
```

## Variance Decomposition: Market Leverage

```{r, echo = FALSE}
# Merge Market Models
m <- merge(m8, m9,  all = T, by = 'row.names'); rownames(m) <- m[,1]; m[,1] <- NULL
m <- merge(m , m10, all = T, by = 'row.names'); rownames(m) <- m[,1]; m[,1] <- NULL
m <- merge(m , m11, all = T, by = 'row.names'); rownames(m) <- m[,1]; m[,1] <- NULL
m <- merge(m , m12, all = T, by = 'row.names'); rownames(m) <- m[,1]; m[,1] <- NULL
m <- merge(m , m13, all = T, by = 'row.names'); rownames(m) <- m[,1]; m[,1] <- NULL
m <- merge(m , m14, all = T, by = 'row.names'); rownames(m) <- m[,1]; m[,1] <- NULL

# Formatting
colnames(m) <- c(LETTERS[1:ncol(m)])
rownames(m) <- gsub('factor(ENTITY)', 'Firm FE', rownames(m), fixed = T)
rownames(m) <- gsub('factor(DATE)', 'Year FE', rownames(m), fixed = T)
rownames(m) <- gsub('factor(sic)', 'Industry FE', rownames(m), fixed = T)

# Plot
knitr::kable(m, digits = 2, align = 'c', caption = 'The majority of the total variation in capital structure is due to time
invariant factors: Firm and Industry Fixed Effects. Note: the models including firm and/or industry effects estimate more than 1000 parameters (one dummy for each firm and/or industry). Given the reduced sample size of about 20.000 observations, this means one parameter every 20 observation. It is not surprising that firm and/or industry fixed effects explain the majority of variance in the model. Overfitting.')
```


# Table IV: Short-Run versus Long-Run Effects

If mmanagers are concerned only about changes in the long-run equilibrium level of leverage determinants, then it is perhaps unsurprising that previous specifications, explain relatively little of the variation in leverage. They assume that the effect of $X$ on Leverage is delayed by one period and is "complete", in the sense that there are no persistent effects of changes in $X$ on Leverage. However, if managers are slow to respond to changes in $X$ or if managers gradually adjust Leverage to changes in $X$, then the previous equations provide an incomplete description of the leverage data generating process. 
To examine these alternatives, we estimate a distributed lag model of leverage, effectively expanding the traditional specification to incorporate deeper lags of the independent variables.
$$Leverage_{i,t}=\alpha + \sum_{s=1}^{n}\beta_s X_{i,t-s} + \gamma Leverage_{i,0} + \nu_t + \epsilon _{i,t}$$
Here, $n$ corresponds to the lag order of each independent variable contained in the vector $X$. Again, we assume that $s$ is potentially heteroskedastic and correlated within firms, and we drop the first observation for each firm to avoid an identity at time zero.

To determine the appropriate lag length, we undertake two specification searches using the Akaike Information Criterion (AIC) and the Bayesian In formation Criterion (BIC). Both searches suggest a lag length of eight periods, though there is little difference, statistically speaking, between 4 and 10 periods. As such, we present results corresponding to _n = 8_; however, in unreported analysis, we also examine the effect of alternative lag orders (e.g., 4 through 10). The results are qualitatively similar and therefore are not presented.

Rather than presenting all of the estimated coefficients, the following table presents two summary measures for each independent variable in $X$. The first measure is the scaled _short-run impact_, defined as the product of the estimated coefficient on the 1-year lag and the corresponding variable's standard deviation. This measure presents the short-run change in leverage associated with a one standard deviation change in the determinant. 
The second measure is the scaled _long-run impact_, defined as the sum of the eight estimated slope coefficients times the standard deviation of the corresponding variable.


```{r}
# panel data
pdf.lag <- pdf %>% 
  select(BookLeverage, 
         MarketLeverage,
         InitialBookLeverage, 
         InitialMarketLeverage,
         LogSales, 
         MarketToBook, 
         Profitability, 
         Tangibility, 
         MedianIndBookLev, 
         CashFlowVol, 
         DividendPayer)

# generate lags
for(i in colnames(pdf.lag)) 
  if(!i %in% c('BookLeverage', 'MarketLeverage', 'InitialBookLeverage', 'InitialMarketLeverage')) 
    for(l in 1:8) 
      pdf.lag[,paste0('Lag', l, i)] <- lag(pdf.lag[,i], l)

# cleaning
pdf.lag <- na.omit(pdf.lag)

# utility function: estimate linear model and short/long run coefficients
sl.effect <- function(y, x, data){
  n <- colnames(data)
  f <- as.formula(paste0(y, ' ~ ', x, ' + ', paste(n[startsWith(n, 'Lag')], collapse = ' + ')))
  m <- plm(f, data = data, model = 'within', effect = 'time')
  beta <- coef(m)
  par <- names(beta)
  short <- beta[par==x | startsWith(par, 'Lag1')]
  long <- beta[startsWith(par, 'Lag')]
  names(short) <- gsub('Lag.', '', names(short))
  names(long) <- gsub('Lag.', '', names(long))
  long <- by(data = long, INDICES = names(long), sum)
  effects <- list(
    short = sapply(names(short), function(i) as.numeric(short[i] * sd(data[,i]))),
    long  = sapply(names(long),  function(i) as.numeric(long[i]  * sd(data[,i])))
  )
  return(effects)
}

# Book and Market short/long run coefficients
book   <- sl.effect(y = 'BookLeverage',   x = 'InitialBookLeverage',   data = pdf.lag)
market <- sl.effect(y = 'MarketLeverage', x = 'InitialMarketLeverage', data = pdf.lag)
```

```{r, echo = FALSE}
b <- merge(
  as.data.frame(book$short, nm = 'Book Short-Run'),
  as.data.frame(book$long,  nm = 'Book Long-Run'),
  by = 'row.names', 
  all = TRUE
)

m <- merge(
  as.data.frame(market$short, nm = 'Market Short-Run'),
  as.data.frame(market$long,  nm = 'Market Long-Run'),
  by = 'row.names', 
  all = TRUE
)

t <- merge(b, m, all = TRUE); rownames(t) <- t[,1]; t[,1] <- NULL
t <- t[c('InitialBookLeverage', 'InitialMarketLeverage', 'LogSales', 'MarketToBook', 'Profitability', 'Tangibility', 'MedianIndBookLev', 'CashFlowVol', 'DividendPayer'),]
knitr::kable(t, digits = 2, align = 'c', caption = 'Despite expanding the dynamic structure of the model along each determinant dimension, initial leverage is still economically and statistically significant in every specification (not shown in the table). Thus, even when firms are allowed to respond to both short run and long-run shifts in leverage determinants, initial leverage ratios still play an important role in determining future leverage ratios.')

```

# Download Code 

Download the full code to generate this document and reproduce the examples. The file is in [R Markdown](https://rmarkdown.rstudio.com/), format for making dynamic documents with R. An R Markdown document is written in markdown (an easy-to-write plain text format) and contains chunks of embedded R code.\
[Download](https://storage.googleapis.com/emanueleguidotti/R/Lemmon-Roberts-Zender-2008.Rmd)

[_by [Emanuele Guidotti](https://emanueleguidotti.dev)_]{style="float:right"}

\

