[Eventstudies-commits] r142 - in pkg: R vignettes
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Sep 13 07:41:56 CEST 2013
Author: vikram
Date: 2013-09-13 07:41:56 +0200 (Fri, 13 Sep 2013)
New Revision: 142
Modified:
pkg/R/AMM.R
pkg/vignettes/eventstudies.Rnw
Log:
Fixed the lag problem in AMM function
Modified: pkg/R/AMM.R
===================================================================
--- pkg/R/AMM.R 2013-08-26 18:55:33 UTC (rev 141)
+++ pkg/R/AMM.R 2013-09-13 05:41:56 UTC (rev 142)
@@ -31,7 +31,7 @@
# Checking remaining arguments
if (match("nlags", names(modelArgs), nomatch = -1) == -1) {
- nlags <- 1
+ nlags <- 0
} else {
nlags <- modelArgs$nlags
}
@@ -95,7 +95,7 @@
colnames(result) <- cn.names
}
- index(result) <- as.Date(index(result))
+ ## index(result) <- as.Date(index(result))
return(result)
}
@@ -221,7 +221,7 @@
}
###############################################
-# Estimating one firm's exposure in one period.
+## Estimating one firm's exposure in one period.
###############################################
firmExposures <- function(firm.returns, X, nlags=NA, verbose=FALSE) {
do.ols <- function(nlags) {
Modified: pkg/vignettes/eventstudies.Rnw
===================================================================
--- pkg/vignettes/eventstudies.Rnw 2013-08-26 18:55:33 UTC (rev 141)
+++ pkg/vignettes/eventstudies.Rnw 2013-09-13 05:41:56 UTC (rev 142)
@@ -264,7 +264,7 @@
amm.residual <- AMM(firm.returns=StockPriceReturns[,1:3],
verbose=FALSE, market.returns=nifty.index,
others=inrusd, switch.to.innov=TRUE,
- market.returns.purge=TRUE, nlags=0)
+ market.returns.purge=TRUE, nlags=1)
@
More information about the Eventstudies-commits
mailing list