[Returnanalytics-commits] r3100 - in pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Sep 14 00:30:19 CEST 2013
Author: shubhanm
Date: 2013-09-14 00:30:18 +0200 (Sat, 14 Sep 2013)
New Revision: 3100
Modified:
pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/NAMESPACE
pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/R/glmi.R
pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/R/lmi.R
pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/man/glmi.Rd
pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/man/lmi.Rd
Log:
documentation added
Modified: pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/NAMESPACE
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/NAMESPACE 2013-09-13 21:15:47 UTC (rev 3099)
+++ pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/NAMESPACE 2013-09-13 22:30:18 UTC (rev 3100)
@@ -4,7 +4,9 @@
export(chart.AcarSim)
export(chart.Autocorrelation)
export(EmaxDDGBM)
+export(glmi)
export(GLMSmoothIndex)
+export(lmi)
export(LoSharpe)
export(QP.Norm)
export(Return.GLM)
Modified: pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/R/glmi.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/R/glmi.R 2013-09-13 21:15:47 UTC (rev 3099)
+++ pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/R/glmi.R 2013-09-13 22:30:18 UTC (rev 3100)
@@ -1,3 +1,59 @@
+#'@title Fitting Generalized Linear Models with HC and HAC Covariance Matrix Estimators
+#'@description
+#' glm is used to fit generalized linear models, specified by giving a symbolic description of the linear predictor and a description of the error distribution.
+#' @details
+#' see \code{\link{glm}}.
+#' @param formula
+#'an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted. The details of model specification are given under ‘Details’.
+#'
+#'@param family
+#' a description of the error distribution and link function to be used in the model. This can be a character string naming a family function, a family function or the result of a call to a family function. (See family for details of family functions.)
+#'@param data
+#'an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from which lm is called.
+#'
+#'@param vcov HC-HAC covariance estimation
+#'@param weights
+#'an optional vector of weights to be used in the fitting process. Should be NULL or a numeric vector. If non-NULL, weighted least squares is used with weights weights (that is, minimizing sum(w*e^2)); otherwise ordinary least squares is used. See also ‘Details’,
+#'@param subset
+#'an optional vector specifying a subset of observations to be used in the fitting process.
+#'
+#'
+#'@param na.action
+#'a function which indicates what should happen when the data contain NAs. The default is set by the na.action setting of options, and is na.fail if that is unset. The ‘factory-fresh’ default is na.omit. Another possible value is NULL, no action. Value na.exclude can be useful.
+#'
+#'@param start
+#'starting values for the parameters in the linear predictor.
+#'
+#'@param etastart
+#'starting values for the linear predictor.
+#'
+#'@param mustart
+#'starting values for the vector of means.
+#'
+#'@param offset
+#'this can be used to specify an a priori known component to be included in the linear predictor during fitting. This should be NULL or a numeric vector of length equal to the number of cases. One or more offset terms can be included in the formula instead or as well, and if more than one is specified their sum is used. See model.offset.
+#'
+#'@param control
+#'a list of parameters for controlling the fitting process. For glm.fit this is passed to glm.control.
+#'
+#'@param model
+#' a logical value indicating whether model frame should be included as a component of the returned value.
+#'@param method
+#'the method to be used; for fitting, currently only method = "qr" is supported; method = "model.frame" returns the model frame (the same as with model = TRUE, see below).
+#'
+#'@param x logicals. If TRUE the corresponding components of the fit (the model frame, the model matrix, the response, the QR decomposition) are returned.
+#'@param y logicals. If TRUE the corresponding components of the fit (the model frame, the model matrix, the response, the QR decomposition) are returned.
+#'
+#'@param contrasts
+#'an optional list. See the contrasts.arg of model.matrix.default.
+#'
+#'@param \dots
+#'additional arguments to be passed to the low level regression fitting functions (see below).
+#' @author The original R implementation of glm was written by Simon Davies working for Ross Ihaka at the University of Auckland, but has since been extensively re-written by members of the R Core team.
+#' The design was inspired by the S function of the same name described in Hastie & Pregibon (1992).
+#' @keywords HC HAC covariance estimation regression fitting model
+#' @rdname glmi
+#' @export
glmi <- function (formula, family = gaussian, data,vcov = NULL, weights, subset,
na.action, start = NULL, etastart, mustart, offset, control = list(...),
model = TRUE, method = "glm.fit", x = FALSE, y = TRUE, contrasts = NULL,
Modified: pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/R/lmi.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/R/lmi.R 2013-09-13 21:15:47 UTC (rev 3099)
+++ pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/R/lmi.R 2013-09-13 22:30:18 UTC (rev 3100)
@@ -1,4 +1,48 @@
-
+#'@title Fitting Generalized Linear Models with HC and HAC Covariance Matrix Estimators
+#'@description
+#' lm is used to fit generalized linear models, specified by giving a symbolic description of the linear predictor and a description of the error distribution.
+#' @details
+#' see \code{\link{lm}}.
+#' @param formula
+#'an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted. The details of model specification are given under ‘Details’.
+#'
+#'
+#'@param data
+#'an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from which lm is called.
+#'
+#'@param vcov HC-HAC covariance estimation
+#'@param weights
+#'an optional vector of weights to be used in the fitting process. Should be NULL or a numeric vector. If non-NULL, weighted least squares is used with weights weights (that is, minimizing sum(w*e^2)); otherwise ordinary least squares is used. See also ‘Details’,
+#'
+#'
+#'@param subset
+#'an optional vector specifying a subset of observations to be used in the fitting process.
+#'@param na.action
+#'a function which indicates what should happen when the data contain NAs. The default is set by the na.action setting of options, and is na.fail if that is unset. The ‘factory-fresh’ default is na.omit. Another possible value is NULL, no action. Value na.exclude can be useful.
+#'
+#'@param method
+#'the method to be used; for fitting, currently only method = "qr" is supported; method = "model.frame" returns the model frame (the same as with model = TRUE, see below).
+#'
+#'@param model logicals. If TRUE the corresponding components of the fit (the model frame, the model matrix, the response, the QR decomposition) are returned.
+#'@param x logicals. If TRUE the corresponding components of the fit (the model frame, the model matrix, the response, the QR decomposition) are returned.
+#'@param y logicals. If TRUE the corresponding components of the fit (the model frame, the model matrix, the response, the QR decomposition) are returned.
+#'@param qr logicals. If TRUE the corresponding components of the fit (the model frame, the model matrix, the response, the QR decomposition) are returned.
+#'@param singular.ok
+#'logical. If FALSE (the default in S but not in R) a singular fit is an error.
+#'
+#'@param contrasts
+#'an optional list. See the contrasts.arg of model.matrix.default.
+#'
+#'@param offset
+#'this can be used to specify an a priori known component to be included in the linear predictor during fitting. This should be NULL or a numeric vector of length equal to the number of cases. One or more offset terms can be included in the formula instead or as well, and if more than one are specified their sum is used. See model.offset.
+#'
+#'@param \dots
+#'additional arguments to be passed to the low level regression fitting functions (see below).
+#' @author The original R implementation of glm was written by Simon Davies working for Ross Ihaka at the University of Auckland, but has since been extensively re-written by members of the R Core team.
+#' The design was inspired by the S function of the same name described in Hastie & Pregibon (1992).
+#' @keywords HC HAC covariance estimation regression fitting model
+#' @rdname lmi
+#' @export
lmi <- function (formula, data,vcov = NULL, subset, weights, na.action, method = "qr",
model = TRUE, x = FALSE, y = FALSE, qr = TRUE, singular.ok = TRUE,
contrasts = NULL, offset, ...)
Modified: pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/man/glmi.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/man/glmi.Rd 2013-09-13 21:15:47 UTC (rev 3099)
+++ pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/man/glmi.Rd 2013-09-13 22:30:18 UTC (rev 3100)
@@ -1,6 +1,6 @@
\name{glmi}
\alias{glmi}
-\title{Support of HAC methods within lm regression model}
+\title{Fitting Generalized Linear Models with HC and HAC Covariance Matrix Estimators}
\usage{
glmi(formula, family = gaussian, data, vcov = NULL,
weights, subset, na.action, start = NULL, etastart,
@@ -8,11 +8,107 @@
method = "glm.fit", x = FALSE, y = TRUE,
contrasts = NULL, ...)
}
+\arguments{
+ \item{formula}{an object of class "formula" (or one that
+ can be coerced to that class): a symbolic description of
+ the model to be fitted. The details of model
+ specification are given under ‘Details’.}
+
+ \item{family}{a description of the error distribution and
+ link function to be used in the model. This can be a
+ character string naming a family function, a family
+ function or the result of a call to a family function.
+ (See family for details of family functions.)}
+
+ \item{data}{an optional data frame, list or environment
+ (or object coercible by as.data.frame to a data frame)
+ containing the variables in the model. If not found in
+ data, the variables are taken from environment(formula),
+ typically the environment from which lm is called.}
+
+ \item{vcov}{HC-HAC covariance estimation}
+
+ \item{weights}{an optional vector of weights to be used
+ in the fitting process. Should be NULL or a numeric
+ vector. If non-NULL, weighted least squares is used with
+ weights weights (that is, minimizing sum(w*e^2));
+ otherwise ordinary least squares is used. See also
+ ‘Details’,}
+
+ \item{subset}{an optional vector specifying a subset of
+ observations to be used in the fitting process.}
+
+ \item{na.action}{a function which indicates what should
+ happen when the data contain NAs. The default is set by
+ the na.action setting of options, and is na.fail if that
+ is unset. The ‘factory-fresh’ default is na.omit.
+ Another possible value is NULL, no action. Value
+ na.exclude can be useful.}
+
+ \item{start}{starting values for the parameters in the
+ linear predictor.}
+
+ \item{etastart}{starting values for the linear
+ predictor.}
+
+ \item{mustart}{starting values for the vector of means.}
+
+ \item{offset}{this can be used to specify an a priori
+ known component to be included in the linear predictor
+ during fitting. This should be NULL or a numeric vector
+ of length equal to the number of cases. One or more
+ offset terms can be included in the formula instead or as
+ well, and if more than one is specified their sum is
+ used. See model.offset.}
+
+ \item{control}{a list of parameters for controlling the
+ fitting process. For glm.fit this is passed to
+ glm.control.}
+
+ \item{model}{a logical value indicating whether model
+ frame should be included as a component of the returned
+ value.}
+
+ \item{method}{the method to be used; for fitting,
+ currently only method = "qr" is supported; method =
+ "model.frame" returns the model frame (the same as with
+ model = TRUE, see below).}
+
+ \item{x}{logicals. If TRUE the corresponding components
+ of the fit (the model frame, the model matrix, the
+ response, the QR decomposition) are returned.}
+
+ \item{y}{logicals. If TRUE the corresponding components
+ of the fit (the model frame, the model matrix, the
+ response, the QR decomposition) are returned.}
+
+ \item{contrasts}{an optional list. See the contrasts.arg
+ of model.matrix.default.}
+
+ \item{\dots}{additional arguments to be passed to the low
+ level regression fitting functions (see below).}
+}
\description{
- Support of HAC methods within lm regression model
+ glm is used to fit generalized linear models, specified
+ by giving a symbolic description of the linear predictor
+ and a description of the error distribution.
}
-\seealso{
- \code{\link{glm}
+\details{
+ see \code{\link{glm}}.
}
+\author{
+ The original R implementation of glm was written by Simon
+ Davies working for Ross Ihaka at the University of
+ Auckland, but has since been extensively re-written by
+ members of the R Core team. The design was inspired by
+ the S function of the same name described in Hastie &
+ Pregibon (1992).
}
+\keyword{covariance}
+\keyword{estimation}
+\keyword{fitting}
+\keyword{HAC}
+\keyword{HC}
+\keyword{model}
+\keyword{regression}
Modified: pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/man/lmi.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/man/lmi.Rd 2013-09-13 21:15:47 UTC (rev 3099)
+++ pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/man/lmi.Rd 2013-09-13 22:30:18 UTC (rev 3100)
@@ -1,17 +1,102 @@
\name{lmi}
\alias{lmi}
-\title{Support of HAC methods within glm regression model}
+\title{Fitting Generalized Linear Models with HC and HAC Covariance Matrix Estimators}
\usage{
lmi(formula, data, vcov = NULL, subset, weights,
na.action, method = "qr", model = TRUE, x = FALSE,
y = FALSE, qr = TRUE, singular.ok = TRUE,
contrasts = NULL, offset, ...)
}
+\arguments{
+ \item{formula}{an object of class "formula" (or one that
+ can be coerced to that class): a symbolic description of
+ the model to be fitted. The details of model
+ specification are given under ‘Details’.}
+
+ \item{data}{an optional data frame, list or environment
+ (or object coercible by as.data.frame to a data frame)
+ containing the variables in the model. If not found in
+ data, the variables are taken from environment(formula),
+ typically the environment from which lm is called.}
+
+ \item{vcov}{HC-HAC covariance estimation}
+
+ \item{weights}{an optional vector of weights to be used
+ in the fitting process. Should be NULL or a numeric
+ vector. If non-NULL, weighted least squares is used with
+ weights weights (that is, minimizing sum(w*e^2));
+ otherwise ordinary least squares is used. See also
+ ‘Details’,}
+
+ \item{subset}{an optional vector specifying a subset of
+ observations to be used in the fitting process.}
+
+ \item{na.action}{a function which indicates what should
+ happen when the data contain NAs. The default is set by
+ the na.action setting of options, and is na.fail if that
+ is unset. The ‘factory-fresh’ default is na.omit.
+ Another possible value is NULL, no action. Value
+ na.exclude can be useful.}
+
+ \item{method}{the method to be used; for fitting,
+ currently only method = "qr" is supported; method =
+ "model.frame" returns the model frame (the same as with
+ model = TRUE, see below).}
+
+ \item{model}{logicals. If TRUE the corresponding
+ components of the fit (the model frame, the model matrix,
+ the response, the QR decomposition) are returned.}
+
+ \item{x}{logicals. If TRUE the corresponding components
+ of the fit (the model frame, the model matrix, the
+ response, the QR decomposition) are returned.}
+
+ \item{y}{logicals. If TRUE the corresponding components
+ of the fit (the model frame, the model matrix, the
+ response, the QR decomposition) are returned.}
+
+ \item{qr}{logicals. If TRUE the corresponding components
+ of the fit (the model frame, the model matrix, the
+ response, the QR decomposition) are returned.}
+
+ \item{singular.ok}{logical. If FALSE (the default in S
+ but not in R) a singular fit is an error.}
+
+ \item{contrasts}{an optional list. See the contrasts.arg
+ of model.matrix.default.}
+
+ \item{offset}{this can be used to specify an a priori
+ known component to be included in the linear predictor
+ during fitting. This should be NULL or a numeric vector
+ of length equal to the number of cases. One or more
+ offset terms can be included in the formula instead or as
+ well, and if more than one are specified their sum is
+ used. See model.offset.}
+
+ \item{\dots}{additional arguments to be passed to the low
+ level regression fitting functions (see below).}
+}
\description{
- Support of HAC methods within glm regression model
+ lm is used to fit generalized linear models, specified by
+ giving a symbolic description of the linear predictor and
+ a description of the error distribution.
}
-\seealso{
- \code{\link{lm}
+\details{
+ see \code{\link{lm}}.
}
+\author{
+ The original R implementation of glm was written by Simon
+ Davies working for Ross Ihaka at the University of
+ Auckland, but has since been extensively re-written by
+ members of the R Core team. The design was inspired by
+ the S function of the same name described in Hastie &
+ Pregibon (1992).
}
+\keyword{covariance}
+\keyword{estimation}
+\keyword{fitting}
+\keyword{HAC}
+\keyword{HC}
+\keyword{model}
+\keyword{regression}
More information about the Returnanalytics-commits
mailing list