281
Missing Data
Computing the Likelihood Ratio Chi-Square Statistic and P
Instead of consulting a chi-square table, you can use the ChiSquareProbability method
to find the probability that a chi-square value as large as 11.547 would have occurred
with a correct factor model. The following program shows how the
ChiSquareProbability method is used. The program is saved as Ex17-c.vb.
The program output is displayed in the Debug output panel of the program editor.
Sub Main()
Dim ChiSquare As Double, P As Double
Dim Df As Integer
ChiSquare = 1375.133 - 1363.586 'Difference in functions of log-likelihood
Df = 27 - 19 'Difference in no. of parameters
P = AmosEngine.ChiSquareProbability(ChiSquare, CDbl(Df))
Debug.WriteLine( "Fit of factor model:")
Debug.WriteLine( "Chi Square = " & ChiSquare.ToString("#,##0.000"))
Debug.WriteLine("DF = " & Df)
Debug.WriteLine("P = " & P.ToString("0.000"))
End Sub