[Eventstudies-commits] r178 - pkg/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Mar 3 07:44:30 CET 2014


Author: chiraganand
Date: 2014-03-03 07:44:30 +0100 (Mon, 03 Mar 2014)
New Revision: 178

Modified:
   pkg/man/subperiod.lmAMM.Rd
Log:
Added classes to arguments, re-formatted the example code and value sections. Some small text modifications.

Modified: pkg/man/subperiod.lmAMM.Rd
===================================================================
--- pkg/man/subperiod.lmAMM.Rd	2014-02-18 13:21:09 UTC (rev 177)
+++ pkg/man/subperiod.lmAMM.Rd	2014-03-03 06:44:30 UTC (rev 178)
@@ -1,41 +1,50 @@
 \name{subperiod.lmAMM}
 \alias{subperiod.lmAMM}
 
-\title{A function that estimates exposure for a single firm over multiple periods}
+\title{Function to estimate exposure for a single firm over multiple periods}
 
-\description{This function typically utilises an firm.returns vector
-  and an X matrix of explanatory variables obtained out of
-  using the makeX function. This would compute the exposure
-  for all columns in X for the specified time periods. 
+\description{This function typically utilises a firm.returns vector and
+  an X matrix of explanatory variables obtained out of the
+  \sQuote{makeX} function. It computes the exposure for all columns in X
+  for the specified time periods.
 }
 
 \usage{
-subperiod.lmAMM(firm.returns, X, nlags = 1, verbose = FALSE, dates = NULL, residual = TRUE)
+subperiod.lmAMM(firm.returns,
+                X,
+                nlags = 1,
+                verbose = FALSE,
+                dates = NULL,
+                residual = TRUE)
 }
 
 \arguments{
-  \item{firm.returns}{A vector of data for one firm
+  \item{firm.returns}{a \sQuote{numeric} vector of data for one firm.
   }
-  \item{X}{A matrix of explanatory variables obtained from
-    the makeX function. The first variable is always the
+  \item{X}{a matrix of explanatory variables obtained from
+    the \sQuote{makeX()} function. The first variable is always the
     stock market index. Other variables could be risk factors
     such as currency or bond returns, or foreign portfolio inflows.
   }
-  \item{nlags}{Number of lags of explanatory variables. When unspecified
-    the best lag using the AIC is used.
+  \item{nlags}{\sQuote{integer} of length 1, number of lags of explanatory
+  variables. When unspecified, the best lag using the AIC is used.
   }
-  \item{verbose}{Default is FALSE. When set to TRUE, the function
-    prints detailed results of using the function. 
+  \item{verbose}{\sQuote{logical}, indicating whether the function
+    should print detailed results.
   }
-  \item{dates}{Default is NULL. If no dates are mentioned, subperiod.lmAMM does
-  what firmExposures() would do, i.e., estimate exposures for the full time period.
+  \item{dates}{object of \sQuote{Date} class, specifying the time period
+  to estimate exposures for. Default is \sQuote{NULL}. If no dates are
+  mentioned, \sQuote{subperiod.lmAMM} does what \sQuote{firmExposures()}
+  would do, i.e., estimate exposures for the full time period.
   }
-  \item{residual}{Returns AMM Residuals if TRUE, AMM exposure
-  otherwise. Defaults to TRUE.}
+  \item{residual}{\sQuote{logical}, returns AMM residuals if TRUE, AMM
+  exposure otherwise. Defaults to \sQuote{TRUE}.}
 }
-\value{ The function returns the exposures, HAC adjusted standard
-  errors, the number of lags used, and the residuals from the fitted
-  model.}
+\value{A \sQuote{list} of length 3 is returned:
+  \item{exposures}{AMM exposure}
+  \item{sds}{HAC adjusted standard errors}
+  \item{residuals}{an \sQuote{xts} object of the residuals from the fitted model}
+}
 
 \author{Vimal Balasubramaniam}
 
@@ -43,20 +52,29 @@
 \code{\link{manyfirmsAMM}}}
 
 \examples{ 
-# Create RHS before running subperiod.lmAMM()
 data("lmAMMData")
+
+## Create RHS before running subperiod.lmAMM()
 firm.returns <- lmAMMData$Infosys
 market.returns <- lmAMMData$index.nifty
 currency.returns <- lmAMMData$currency.inrusd
-regressors <- makeX(market.returns, others=currency.returns,
-              switch.to.innov=TRUE, market.returns.purge=TRUE, nlags=1,
-              dates=as.Date(c("2012-02-01","2013-01-01","2014-01-31")), verbose=FALSE)
-# Run AMM for one firm across different periods
+
+regressors <- makeX(market.returns,
+                    others = currency.returns,
+                    switch.to.innov = TRUE,
+                    market.returns.purge = TRUE,
+                    nlags = 1,
+                    dates = as.Date(c("2012-02-01","2013-01-01","2014-01-20")),
+                    verbose = FALSE)
+
+## Run AMM for one firm across different periods
 res <- subperiod.lmAMM(firm.returns,
-		 X=regressors,
-                 nlags=1,
-            	 verbose=TRUE,
-            	 dates= as.Date(c("2012-02-01","2013-01-01","2014-01-31")))
+                       X = regressors,
+                       nlags = 1,
+                       verbose = FALSE,
+                       dates = as.Date(c("2012-02-01",
+                                         "2013-01-01",
+                                         "2014-01-20")))
 }
 
 \keyword{subperiod.lmAMM}
\ No newline at end of file



More information about the Eventstudies-commits mailing list