[Eventstudies-commits] r210 - in pkg: man vignettes
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Mar 21 07:31:28 CET 2014
Author: vikram
Date: 2014-03-21 07:31:27 +0100 (Fri, 21 Mar 2014)
New Revision: 210
Modified:
pkg/man/StockPriceReturns.Rd
pkg/vignettes/amm.Rnw
Log:
Fixed AMM vignette R code
Modified: pkg/man/StockPriceReturns.Rd
===================================================================
--- pkg/man/StockPriceReturns.Rd 2014-03-21 05:26:06 UTC (rev 209)
+++ pkg/man/StockPriceReturns.Rd 2014-03-21 06:31:27 UTC (rev 210)
@@ -4,7 +4,7 @@
\alias{StockPriceReturns}
-\title{An example dataset of stock price returns to perform eventstudy analysis.}
+\title{An example dataset of stock price returns to perform event study analysis.}
% FIXME: Remove NAs in the dataset? If we do complete.cases then all rows will be removed
\description{This data set contains stock price returns of 30 major
Modified: pkg/vignettes/amm.Rnw
===================================================================
--- pkg/vignettes/amm.Rnw 2014-03-21 05:26:06 UTC (rev 209)
+++ pkg/vignettes/amm.Rnw 2014-03-21 06:31:27 UTC (rev 210)
@@ -115,7 +115,7 @@
tmp.res <- zoo(tmp,as.Date(names(tmp)))
}
## One firm
-amm.output.one <- lmAMM(regressand[,1],X,nlags=1)
+amm.output.one <- lmAMM(regressand[,1],X=regressors,nlags=1)
amm.resid.one <- timeseries.lmAMM(firm.returns=regressand[,1],
X=regressors, verbose=FALSE, nlags=1)
summary(amm.output.one)
@@ -123,7 +123,7 @@
## More than one firm
# Extracting and merging
tmp.resid <- sapply(colnames(regressand)[1:2],function(y)
- timeseriesAMM(firm.returns=regressand[,y],
+ timeseries.lmAMM(firm.returns=regressand[,y],
X=regressors,
verbose=FALSE,
nlags=1))
@@ -159,7 +159,7 @@
deprintize<-function(f){
return(function(...) {capture.output(w<-f(...));return(w);});
}
-firm.exposure <- deprintize(subperiod.lmAMM)(firm.returns=firm.returns,
+firm.exposure <- deprintize(subperiod.lmAMM)(firm.returns=regressand[,1],
X=regressors,
nlags=1,
verbose=TRUE,
More information about the Eventstudies-commits
mailing list