Purpose
Computes P-values for a χ2 deviate.
Syntax
PCHISQ dof value
Arguments and Subcommands
dof
Degrees of freedom of the χ2 variate. This must be a positive integer; it may be a named constant.
value
The value of the χ2 deviate. This must be a positive value; it may be a named constant.
Remarks
This command makes use of the routine presented by Press et al (1986) to find the significance level of likelihood ratio tests based on the change in deviance for nested models.
Examples
a) To compute the P-value for a 2 degree of freedom χ2 statistic with the value 5.5:
PCHISQ 2 5.5
b) To use named constant transformations and the PCHISQ command to compute the P-value for a likelihood ratio test. It is assumed that the named constants #odf, and #odv contain the degrees of freedom and deviance, respectively, for a model nested within the current model. The first step involves the computation of the change in deviance and degrees of freedom. The P-value is computed in the second command.
CONS #ddf = #odf - #
df; #ddv = #odv - #
dv @
PCHISQ #ddf #ddv