Returns a NumericalVariable whose observations are the difference between successive observations over intervals of observations.

Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (Extreme.Numerics)

Syntax

Visual Basic (Declaration)
Public Function GetPeriodToDateDifferences ( _
	startOfPeriod As DateTimeVariable, _
	startOfSummaryPeriod As DateTimeVariable, _
	startBehavior As BoundaryIntervalBehavior, _
	endBehavior As BoundaryIntervalBehavior _
) As NumericalVariable
C#
public NumericalVariable GetPeriodToDateDifferences (
	DateTimeVariable startOfPeriod,
	DateTimeVariable startOfSummaryPeriod,
	BoundaryIntervalBehavior startBehavior,
	BoundaryIntervalBehavior endBehavior
)
C++
public:
NumericalVariable^ GetPeriodToDateDifferences (
	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 obtain data for individual periods from a period-to-date time series variable. For example, if the variable contains quarter-to-date monthly earnings, you can use this method to calculate the actual monthly earnings.

The new variable gets the name pdiff(<name>), where <name> is the name of the original variable.

Exceptions

ExceptionCondition
ArgumentNullExceptionstartOfPeriod is nullNothingnullptr.

-or-

startOfSummaryPeriod is nullNothingnullptr.

DimensionMismatchException The length of startOfPeriod does not equal the length of the numerical variable.

See Also