LackOfFitCompute Method (Int32, Double, Int32, Int32) |
Performs lack-of-fit test for a univariate time series or transfer
function given the appropriate correlation function using a minimum
lag of 1.
Namespace: Imsl.StatAssembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax public static double[] Compute(
int nObservations,
double[] correlations,
int npFree,
int lagMax
)
Public Shared Function Compute (
nObservations As Integer,
correlations As Double(),
npFree As Integer,
lagMax As Integer
) As Double()
public:
static array<double>^ Compute(
int nObservations,
array<double>^ correlations,
int npFree,
int lagMax
)
static member Compute :
nObservations : int *
correlations : float[] *
npFree : int *
lagMax : int -> float[]
Parameters
- nObservations
- Type: SystemInt32
An int containing the number of observations of the
stationary time series.
- correlations
- Type: SystemDouble
A double array of length lagMax+1 containing the
correlation function.
- npFree
- Type: SystemInt32
An int scalar specifying the number of free parameters in
the formulation of the time series model. npfree
must be greater than or equal to zero and less than
lagMax. Woodfield (1990) recommends
npFree = p + q.
- lagMax
- Type: SystemInt32
An int scalar specifying the maximum lag of the correlation
function.
Return Value
Type:
Double
A
double array of length 2 with the test statistic, Q, and
its
p-value,
p. Under the null hypothesis, Q has an
approximate chi-squared distribution with
lagMax-lagMin+1-npFree degrees of freedom.
See Also