[Returnanalytics-commits] r2195 - pkg/PerformanceAnalytics/sandbox/Meucci/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jul 23 04:28:44 CEST 2012


Author: mkshah
Date: 2012-07-23 04:28:43 +0200 (Mon, 23 Jul 2012)
New Revision: 2195

Modified:
   pkg/PerformanceAnalytics/sandbox/Meucci/R/HermiteGrid.R
Log:
Adding comments for remaining functions

Modified: pkg/PerformanceAnalytics/sandbox/Meucci/R/HermiteGrid.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Meucci/R/HermiteGrid.R	2012-07-23 02:22:44 UTC (rev 2194)
+++ pkg/PerformanceAnalytics/sandbox/Meucci/R/HermiteGrid.R	2012-07-23 02:28:43 UTC (rev 2195)
@@ -1,3 +1,10 @@
+#' Generates the normalized probability for an input probability value
+#' 
+#' @param p             a numeric value containing the probability value required to be normalized 
+#'
+#' @return normalizedp  a numeric value containing the normalized probability value
+#'
+#' @author Ram Ahluwalia \email{ram@@wingedfootcapital.com}
 normalizeProb = function( p )
 {
   tol = 1e-20
@@ -37,6 +44,14 @@
   return( list( xLB = xLB , xUB = xUB ) )
 }
 
+#' Integrate the subinterval for the given cumulative distribution function to get the equivalent probability
+#' 
+#' @param x     a vector containing the data points
+#' @param cdf   the cumulative distribution function
+#'
+#' @return p    a vector containing the cdf evaluated for each of the subintervals
+#'
+#' @author Ram Ahluwalia \email{ram@@wingedfootcapital.com}
 integrateSubIntervals = function( x , cdf )
 {
   bounds = subIntervals( x )



More information about the Returnanalytics-commits mailing list