Learn R Programming

eventstudies (version 1.2.2)

manyfirmssubperiod.lmAMM: Estimate exposure for many regressands over multiple periods

Description

manyfirmssubperiod.lmAMM estimates exposure for many regressands over a set of regressors obtained by using ‘makeX’ over multiple periods.

Usage

manyfirmssubperiod.lmAMM(firm.returns,
                         X,
                         lags,
                         dates = NULL,
                         periodnames = NULL,
                         verbose = FALSE)

Arguments

firm.returns

a ‘zoo’ matrix of data for multiple regressands (firms).

X

a matrix of regressors obtained by using ‘makeX’.

lags

an integer specifying the number of lags to be used in the market model.

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’ used over multiple regressands.

periodnames

a ‘character’ vector of names for each subperiod that has been marked by the “dates” argument.

verbose

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

Warning

Do not have any space between names provided under “periodnames”.

Details

This function computes the exposure, and HAC adjusted standard errors to linear augmented market models estimated for several regressands across multiple periods.

See Also

lmAMM

Examples

Run this code
# NOT RUN {
data("StockPriceReturns", package = "eventstudies")
data("OtherReturns", package = "eventstudies")

firm.returns <- StockPriceReturns[, c("Infosys","TCS")]
market.returns <- OtherReturns$NiftyIndex
currency.returns <- OtherReturns$USDINR

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

res <- manyfirmssubperiod.lmAMM(firm.returns = firm.returns,
                                X = X,
                                lags = 1,
                                dates = as.Date(c("2010-07-01", "2011-11-17", "2013-03-28")),
                                periodnames = c("P1", "P2"),
                                verbose = FALSE)
print(res)
# }

Run the code above in your browser using DataLab