DIFFTEST PreviousNext
Mplus Discussion > Confirmatory Factor Analysis >
Message/Author
 A. Dyrlund posted on Saturday, March 18, 2006 - 10:52 am
I am using the MLMV estimator for my CFA so I am trying to compute the chi-square difference test. I followed the manual by first running the analysis using the DIFFTEST savedata command and then running it a second time with the DIFFTEST analysis command. The file is correctly created by the savedata command but my output keeps telling me "THE CHI-SQUARE DIFFERENCE TEST COULD NOT BE COMPUTED BECAUSE THE H0 MODEL IS NOT NESTED IN THE H1 MODEL." Can anyone tell me what I'm doing wrong?
 Linda K. Muthen posted on Saturday, March 18, 2006 - 2:05 pm
The models must not be nested. If you send the inputs, outputs, data, and your license number to support@statodel.com, we can take a look at it.
 A. Dyrlund posted on Thursday, March 23, 2006 - 11:06 am
No, the models are not nested. I shouldn't be using a DIFFTEST. I was reading a warning in the output as an error. Thank you anyway.
 janni niclasen posted on Wednesday, April 25, 2012 - 3:15 am
Hi

I want to compare two nested models. my samples are large so I have used the WLS estimator. How do I do chi square difference testing? I cannot use the difftest option with the WLS estimator.
 Linda K. Muthen posted on Wednesday, April 25, 2012 - 6:22 am
Take the difference of the chi-square values and the difference of the degrees of freedom.
 janni niclasen posted on Friday, April 27, 2012 - 12:36 am
Can I do that when my data is categorical?
 Linda K. Muthen posted on Friday, April 27, 2012 - 6:36 am
Yes.
 Mészáros Veronika posted on Friday, November 16, 2012 - 2:59 am
Dear Dr. Multhen,

I'd like to run nested models with 1 factor and 17 categorical variables(WLSMV method).
The commands are:
First step: H1 (the less restrictive)
DATA:FILE IS C:\Dokumentumok\Madat\RS_random_CFA_ASCII.dat;
Format IS 20F3.0;
VARIABLE: NAMES ARE y1-y20;
usevariables = y1-y2 y5-y12 y14-y20;
categorical is y1-y2 y5-y12 y14-y20;
missing is blank;
ANALYSIS: Estimator = WLSMV;
MODEL:
F1 BY y1 y5 y6 y8 y10 y15 y18 y19
y2 y7 y9 y11 y12 y14 y16 y17 y20;
savedata: difftest is C:\Dokumentumok\munkahelyi gep\1faktoralap.dat;

Second step: H0 (the more restrictive)
DATA: FILE IS C:\Dokumentumok\Madat\RS_random_CFA_ASCII.dat;
Format IS 20F3.0;
VARIABLE: NAMES ARE y1-y20;
usevariables = y1-y2 y5-y12 y14-y20;
categorical are y1-y2 y5-y12 y14-y20;
missing is blank;
ANALYSIS: Estimator = WLSMV;
DIFFTEST IS C:\Dokumentumok\munkahelyi gep\1faktoralap.dat;
MODEL:
F1 BY y1 y5 y6 y8 y10 y15 y18 y19 y2 y7 y9 y11 y12 y14 y16 y17 y20;
y1 with y15;

And the output is:
the Chi-square difference test is could not be computed because the H0 model is not nested in the H1 model.

I can't see what is wrong. Could you help me?
Thank you for your help,

Veronika
 Linda K. Muthen posted on Friday, November 16, 2012 - 12:07 pm
You have the models reversed. Use the model in the second step to save DIFFTEST and the model in the first step to use it in the ANALYSIS command.
 Kaatje Kraft posted on Monday, September 23, 2013 - 11:13 am
I am attempting to run a difftest and I have received the following error message, "THE CHI-SQUARE DIFFERENCE TEST COULD NOT BE COMPUTED BECAUSE THE FILE
CONTAINING INFORMATION ABOUT THE H1 MODEL HAS INSUFFICIENT DATA."

I'm not sure how to interpret this error (in the first step I saved the data to a .dat file and used that as my reference file for the difftest analysis; when I ran the original analysis with the WSLMV estimator it terminated normally with no error messages). Help?

Thank you
 Linda K. Muthen posted on Monday, September 23, 2013 - 2:27 pm
The second model must have some other difference besides a restriction on a parameter in the first model.
 Kaatje Kraft posted on Tuesday, September 24, 2013 - 7:55 am
I apologize for not clarifying my 2nd model--I set all of the covariances to zero as per the MPlus manual instructions. Is that what you mean by a difference?
 Linda K. Muthen posted on Tuesday, September 24, 2013 - 11:30 am
Please send the two outputs and your license number to support@statmodel.com.
 Mi-young Webb posted on Friday, December 06, 2013 - 7:58 am
Hi,

I am running measurement invariance model with dichotomous items. I follow the steps suggested in the Topic 2 handout. When I test threshold invariance model, I get the following error message:

THE MODEL ESTIMATION TERMINATED NORMALLY

THE CHI-SQUARE DIFFERENCE TEST COULD NOT BE COMPUTED BECAUSE THE H0 MODEL
MAY NOT BE NESTED IN THE H1 MODEL. DECREASING THE CONVERGENCE OPTION MAY
RESOLVE THIS PROBLEM.

DATA: FILE IS ALL.DAT;
FORMAT IS 30F8.0;

VARIABLE: NAMES ARE ID AGE DHH I1-I27;
USEVARIABLES ARE I1-I27;
CATEGORICAL ARE I1-I27;
MISSING ARE BLANK;
GROUPING IS DHH (0=HEAR 1 = DHH);

ANALYSIS: ESTIMATOR IS WLSMV;
PARAMETERIZATION = THETA;
DIFFTEST = METRIC.DAT;

MODEL: ELIPIC BY I1* (1);
.
.
BLEFREE BY I27* (27);

[I1$1-I27$1*];

I1-I27@1;

[ELIPIC-BLEFREE@0];
ELIPIC-BLEFREE@1;
MODEL DHH:
I1-I27@1;
[ELIPIC-BLEFREE*];
ELIPIC-BLEFREE*;

SAVEDATA: DIFFTEST = SCALAR.DAT;
 Linda K. Muthen posted on Friday, December 06, 2013 - 8:29 am
Please send both full outputs and your license number to support@statmodel.com.
 Jiebing Wang posted on Friday, July 11, 2014 - 9:37 am
Hi Dr. Muth¨¦n,

I have tested MI (2 groups) for a four-factor model with 21 binary indicators (WLMSV estimator). The total sample size is over 2,000. I have used DIFFTEST chi-square difference, CFI difference, RMSEA difference to evaluate the MI. The results are: chi-square difference is significant at ¦Á = .001, CFI difference = -.008, RMSEA difference = .004. If only using CFI difference, RMSEA difference to interpret the results, it seems the model reaches the MI, but not according to the DIFFTEST result. Is the DIFFTEST chi-square difference influenced largely by the sample size? In my study, how much weight should I give DIFFTEST chi-square difference to interpret the MI, compare to CFI significance, RMSEA significance?
Many thanks!

Jiebing
 Linda K. Muthen posted on Friday, July 11, 2014 - 10:10 am
I don't believe there has been any work done on using differences in CFI and RMSEA for the weighted least squares estimator. I would look only at the DIFFTEST results in this case.
 Jiebing Wang posted on Tuesday, July 15, 2014 - 9:31 am
Hi Dr. Muthen,

Thank you very much for replying me back. I have more questions on this:
(1) Is the adjusted chi-square and DIFFTEST using WLSMV estimator also influenced largely by the sample size?
(2) Is it normally for researchers to report the adjusted chi-square and df in the result part of the study?
(3) I have tested MGCFA (2 groups; N1 = 1,983, N2 = 395) for a four-factor model with 21 binary indicators (WLMSV estimator).
The results for configural model 1: chi-square (df = 193) = 702.249, p < .001; CFI = .943, TLI = .955, RMSEA = .047.
The results for partial scalar model 2 (I constrained only the factor loading and threshold of items for one of the four factors): chi-square (df = 193) = 713.615, p < .001; CFI = .941, TLI = .954, RMSEA = .048.

DIFFTEST results: chi-square difference (df difference = 3) = 10.829, p = .013.

My question is that why the df for model 1 and model 2 are the same, also why in the DIFFTEST, the df difference is 3?
For my model with large sample size, what is recommended alpha value for chi-square difference test?
 Linda K. Muthen posted on Tuesday, July 15, 2014 - 11:52 am
Which version of Mplus are you using?
 Jiebing Wang posted on Wednesday, July 16, 2014 - 9:41 am
Dr. Muthen,

Mplus 5.21
Many thanks!

Jiebing
 Linda K. Muthen posted on Wednesday, July 16, 2014 - 9:50 am
In that version with WLSMV, you can interpret only the p-value not the chi-square test statistics or the degrees of freedom. These are adjusted to obtain a correct p-value.
 Jiebing Wang posted on Wednesday, July 16, 2014 - 11:51 am
Many thanks!

In what version with WLSMV, could I also refer to the chi-square test statistics and degrees of freedom? I think I have to report them in my study.
 Linda K. Muthen posted on Wednesday, July 16, 2014 - 12:01 pm
You can give the values. But you must interpret only the p-value.
 Jiebing Wang posted on Wednesday, July 16, 2014 - 12:14 pm
Thank you!
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: