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.
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: