Returns a NumericalVariable whose observations are the cumulative sum
over intervals of observations.
Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public Function GetPeriodToDateValues ( _ startOfPeriod As DateTimeVariable, _ startOfSummaryPeriod As DateTimeVariable, _ startBehavior As BoundaryIntervalBehavior, _ endBehavior As BoundaryIntervalBehavior _ ) As NumericalVariable |
| C# |
|---|
public NumericalVariable GetPeriodToDateValues ( DateTimeVariable startOfPeriod, DateTimeVariable startOfSummaryPeriod, BoundaryIntervalBehavior startBehavior, BoundaryIntervalBehavior endBehavior ) |
| C++ |
|---|
public: NumericalVariable^ GetPeriodToDateValues ( DateTimeVariable^ startOfPeriod, DateTimeVariable^ startOfSummaryPeriod, BoundaryIntervalBehavior startBehavior, BoundaryIntervalBehavior endBehavior ) |
Parameters
- startOfPeriod (Extreme.Statistics.DateTimeVariable)
- A DateTimeVariable that specifies the dates corresponding to each observation of the variable.
- startOfSummaryPeriod (Extreme.Statistics.DateTimeVariable)
- A DateTimeVariable that specifies the starting point of each summary period.
- startBehavior (Extreme.Statistics.BoundaryIntervalBehavior)
- A BoundaryIntervalBehavior that specifies how to treat observations before the first entry in startOfSummaryPeriod.
- endBehavior (Extreme.Statistics.BoundaryIntervalBehavior)
- A BoundaryIntervalBehavior that specifies how to treat observations after the last entry in startOfSummaryPeriod.
Return Value
A NumericalVariable.
Remarks
A common use for this method is to create period-to-date sum of a time series variable
relative to a longer time frame. For example, if the variable contains monthly earnings,
you can use this method to calculate the earnings to date per quarter.
The new variable gets the name psum(<name>), where <name> is the name of the original variable.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | startOfPeriod is nullNothingnullptr.
-or- startOfSummaryPeriod is nullNothingnullptr. |
| DimensionMismatchException | The length of startOfPeriod does not equal the length of the numerical variable. |