Learn R Programming

eventstudies (version 1.2.2)

subperiod.lmAMM: Estimate exposure for a single regressor over multiple periods

Description

This function estimates exposure for a single regressand over a set of regressors obtained by using ‘makeX’ over multiple periods.

Usage

subperiod.lmAMM(firm.returns,
                X,
                nlags = 1,
                verbose = FALSE,
                dates = NULL,
                residual = TRUE)

Arguments

firm.returns

a ‘zoo’ vector of data for one regressand (firm).

X

a matrix of regressors obtained by using ‘makeX’. See ‘Details’ when this is specified as a market model.

nlags

specifies a lag length required from the specified set of regressors. When unspecified, the best lag using the AIC is computed for the market model.

verbose

‘logical’, indicating whether the function should print detailed results.

dates

a ‘Date’ class vector, specifying break points in the time series to be used for sub-period identification. The default value is ‘NULL’ resulting in estimates identical to ‘lmAMM’.

residual

‘logical’, returns AMM residuals if TRUE, AMM exposure otherwise. Defaults to ‘TRUE’.

Value

A ‘list’ object of length 3 is returned with:

  • “exposures”: A matrix of exposures by sub-period and regressands.

  • “sds”: HAC adjusted standard errors for all exposures.

  • “residuals”: Contain residuals of class xts from the fitted model for all sub-periods.

Details

When ‘dates’ is ‘NULL’, resulting estimates from this function is identical to ‘lmAMM’.

See Also

lmAMM

Examples

Run this code
# NOT RUN {
data("StockPriceReturns")
data("OtherReturns")

firm.returns <- StockPriceReturns$Infosys
market.returns <- OtherReturns$NiftyIndex
currency.returns <- OtherReturns$USDINR

regressors <- makeX(market.returns,
                    others = currency.returns,
                    switch.to.innov = TRUE,
                    market.returns.purge = TRUE,
                    nlags = 1,
                    dates = as.Date(c("2010-07-01", "2011-11-17", "2013-03-28")),
                    verbose = FALSE)

res <- subperiod.lmAMM(firm.returns,
                       X = regressors,
                       nlags = 1,
                       verbose = FALSE,
                       dates = as.Date(c("2010-07-01", "2011-11-17", "2013-03-28")))
str(res)
# }

Run the code above in your browser using DataLab