Learn R Programming

eventstudies (version 1.2.2)

constantMeanReturn: Extract residuals over constant mean returns

Description

This function computes constant mean return during the estimation period prior to the defined event window. If the firm return is “firm.returns”, then output will be “firm.returns” during the event period less the constant mean return computed over the estimation period.

Usage

constantMeanReturn(firm.returns, residuals = TRUE)

Arguments

firm.returns

a zoo timeseries of firm returns from which constant mean return is computed over the estimation period.

residuals

a ‘logical’ indicating whether to return residuals or ‘constant mean’. When argument to the function includes the entire time series, returns are estimated using the entire data set and not just estimation period, value of residuals should be TRUE in such a case.

Value

Residual returns unexplained by constant mean returns

Examples

Run this code
# NOT RUN {
data(StockPriceReturns)
data(SplitDates)
cmr.result <- constantMeanReturn(firm.returns = StockPriceReturns,
                              residuals = TRUE)

Comparison <- merge(meanAdjustedReturns = cmr.result$Infosys,
                    Infosys = StockPriceReturns$Infosys,
                    all = FALSE)
plot(Comparison)
# }

Run the code above in your browser using DataLab