[Eventstudies-commits] r222 - in pkg: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Mar 25 17:02:33 CET 2014
Author: vikram
Date: 2014-03-25 17:02:32 +0100 (Tue, 25 Mar 2014)
New Revision: 222
Modified:
pkg/R/eventstudy.R
pkg/R/inference.bootstrap.R
pkg/man/lmAMM.Rd
pkg/man/subperiod.lmAMM.Rd
Log:
Minor edit
Modified: pkg/R/eventstudy.R
===================================================================
--- pkg/R/eventstudy.R 2014-03-25 15:34:16 UTC (rev 221)
+++ pkg/R/eventstudy.R 2014-03-25 16:02:32 UTC (rev 222)
@@ -24,7 +24,11 @@
timeseriesAMM <- function(firm.returns,X,verbose=FALSE,nlags=1){
tmp <- resid(lmAMM(firm.returns,X,nlags))
tmp.res <- zoo(tmp,as.Date(names(tmp)))
- }
+ }
+ ## Estimating AMM regressors
+ regressors <- makeX(market.returns, others,
+ market.returns.purge, nlags,
+ switch.to.innov)
if(NCOL(firm.returns)==1){
## One firm
outputModel <- timeseriesAMM(firm.returns=StockPriceReturns[,1],
Modified: pkg/R/inference.bootstrap.R
===================================================================
--- pkg/R/inference.bootstrap.R 2014-03-25 15:34:16 UTC (rev 221)
+++ pkg/R/inference.bootstrap.R 2014-03-25 16:02:32 UTC (rev 222)
@@ -32,16 +32,16 @@
# Plotting inference
plot.inference <- function(inference, xlab="Event time",
ylab="", main="", col.es="dark slate blue"){
- big <- max(abs(es.object$eventstudy.output))
+ big <- max(abs(inference$eventstudy.output))
hilo <- c(-big,big)
- width <- (nrow(es.object$eventstudy.output)-1)/2
- plot(-width:width, es.object$eventstudy.output[,2], type="l", lwd=2, ylim=hilo,
+ width <- (nrow(inference$eventstudy.output)-1)/2
+ plot(-width:width, inference$eventstudy.output[,2], type="l", lwd=2, ylim=hilo,
col=col.es,xlab= xlab, ylab = ylab,
main=paste(main))
- points(-width:width, es.object$eventstudy.output[,2])
- lines(-width:width, es.object$eventstudy.output[,"2.5%"],
+ points(-width:width, inference$eventstudy.output[,2])
+ lines(-width:width, inference$eventstudy.output[,"2.5%"],
lwd=1, lty=2, col=col.es)
- lines(-width:width, es.object$eventstudy.output[,"97.5%"],
+ lines(-width:width, inference$eventstudy.output[,"97.5%"],
lwd=1, lty=2, col=col.es)
abline(h=0,v=0)
}
@@ -68,7 +68,7 @@
rownames(results) <- rownames(es.w)
colnames(results) <- c("2.5%","Mean","97.5%")
if(to.plot==TRUE){
- plot.es(inference=results, xlab, ylab, main)
+ plot.inference(inference=results, xlab, ylab, main)
}
return(results)
}
Modified: pkg/man/lmAMM.Rd
===================================================================
--- pkg/man/lmAMM.Rd 2014-03-25 15:34:16 UTC (rev 221)
+++ pkg/man/lmAMM.Rd 2014-03-25 16:02:32 UTC (rev 222)
@@ -49,7 +49,7 @@
\author{Ajay Shah, Vimal Balasubramaniam}
\seealso{
-\code{\link{manyfirmsAMM}, \link{makeX}}
+\code{\link{makeX}}
}
\examples{
Modified: pkg/man/subperiod.lmAMM.Rd
===================================================================
--- pkg/man/subperiod.lmAMM.Rd 2014-03-25 15:34:16 UTC (rev 221)
+++ pkg/man/subperiod.lmAMM.Rd 2014-03-25 16:02:32 UTC (rev 222)
@@ -48,8 +48,8 @@
\author{Vimal Balasubramaniam}
-\seealso{ \code{\link{firmExposures}},
-\code{\link{manyfirmsAMM}}}
+\seealso{ \code{\link{lmAMM}},
+\code{\link{manyfirmssubperiod.lmAMM}}}
\examples{
data("lmAMMData")
More information about the Eventstudies-commits
mailing list