Missing data in groups and zero variance PreviousNext
Mplus Discussion > Missing Data Modeling >
 Ray posted on Tuesday, March 17, 2009 - 9:14 am
I'm having some trouble understanding how I should reformat my input statement given these problems:

1) I have a grouping variable in which one of the groups has no data. MPlus doesn't like this, apparently.

2) The variance in some of my variables within groups is zero.

How do I overcome these issues?
 Ray posted on Tuesday, March 17, 2009 - 9:17 am
I'm doing a CFA, by the way.
 Ray posted on Tuesday, March 17, 2009 - 9:43 am
Okay, I solved the first problem, but still don't understand how to address the second.
 Bengt O. Muthen posted on Friday, March 20, 2009 - 1:29 pm
You can try:

Variance = nocheck;

but you may still get in trouble when the program tries to invert the sample covariance matrix in that group. You might have to include a dummy person given a small weight.
 Kristine Molina posted on Friday, December 11, 2009 - 8:18 pm

I just tried running a multiple group (4 groups) path analysis and am getting an error that says:

One or more variables have a variance of zero. Check your data and format statement.

I realize that this is because there are no people from one of the subgroups that were sampled in a specific region.

How can I address this issue, and if there is a command I can use, in what section would it go under in the Mplus Editor?

 Bengt O. Muthen posted on Saturday, December 12, 2009 - 9:08 am
You need to have a set of variables that have variance in all groups. So deleting this variable would be a simple solution.
 Rachel Liebman posted on Saturday, September 07, 2013 - 6:15 pm
Hi, I am conducting a CFA in which a latent variable is regressed on 2 dichotomous variables. I keep getting this error message:

One or more variables have a variance of zero. Check your data and format statement.

Continuous Number of
Variable Observations Variance

**IPV 41 0.000
CHIADOL 41 0.678

IPV is a dichotomous variable. i've checked the data and it shouldn't have zero variance - group 1 has 42 people and group 2 has 22. there are only a couple missing data points, and no blanks. I'm not sure what is causing the problem.

Here is my syntax:

f1 BY zaffang Zharm@.5 ZRisk zconcen@.5;
f2 BY ineffnob* zdamsham* zguilt zsomat zsystems;
f3 BY zvicoth distrrev@1;
distrrev WITH zconcen ;
f4 BY f1* f2@.33 f3@.33;

f4 ON IPV;
f4 ON chiadol;

This error only comes up when I run both the regressions listed above. If I just include f4 on ipv, I don't get the error. Any ideas what might be causing this?
 Linda K. Muthen posted on Sunday, September 08, 2013 - 6:47 am
Please send the output and data to support@statmodel.com.
 P.Kwei posted on Monday, April 27, 2015 - 8:16 am
Hello Dr Muthen,
I am new to MPlus and just feeling my way around it. I want to run an MSEM and when I added Gender (1=Male, 2=Female) as a control variable, I got the error below. I had used the DEFINE option to create a new
variable but it has not worked. What is the way around it?

One or more variables have a variance of zero.
Check your data and format statement.
 Linda K. Muthen posted on Monday, April 27, 2015 - 10:17 am
Please send your output and license number to support@statmodel.com.
 Daria Bakina posted on Thursday, August 06, 2015 - 6:54 am
I'm getting a similar message "ERROR
One or more variables have a variance of zero.
Check your data and format statement."

I checked the data files and the data is there. I saved the data in two versions of a .txt file (Comma Delimited and MS-DOS).

Any suggestions on fixing this would be appreciated!
 Linda K. Muthen posted on Thursday, August 06, 2015 - 11:54 am
Please send the output, data set, and your license number to support@statmodel.com.
Back to top
Add Your Message Here
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Options: Enable HTML code in message
Automatically activate URLs in message