Missing data in groups and zero variance PreviousNext
Mplus Discussion > Missing Data Modeling >
Message/Author
 Ray posted on Tuesday, March 17, 2009 - 2:14 pm
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 - 2:17 pm
I'm doing a CFA, by the way.
 Ray posted on Tuesday, March 17, 2009 - 2:43 pm
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 - 6: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 Saturday, December 12, 2009 - 2:18 am
Hi--

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

*** ERROR
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?

Thanks!
Kristine
 Bengt O. Muthen posted on Saturday, December 12, 2009 - 3:08 pm
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 Sunday, September 08, 2013 - 12:15 am
Hi, I am conducting a CFA in which a latent variable is regressed on 2 dichotomous variables. I keep getting this error message:

*** ERROR
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:

MODEL:
f1 BY zaffang Zharm@.5 ZRisk zconcen@.5;
zAFFANG WITH zSOMAT ;
f2 BY ineffnob* zdamsham* zguilt zsomat zsystems;
zSOMAT WITH ZRISK ;
f3 BY zvicoth distrrev@1;
distrrev WITH zconcen ;
ZDAMSHAM WITH INEFFNOB;
INEFFNOB WITH ZSYSTEMS ;
INEFFNOB WITH distrrev;
ZDAMSHAM WITH INEFFNOB ;
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 - 12:47 pm
Please send the output and data to support@statmodel.com.
 P.Kwei posted on Monday, April 27, 2015 - 2:16 pm
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?

*** ERROR
One or more variables have a variance of zero.
Check your data and format statement.
 Linda K. Muthen posted on Monday, April 27, 2015 - 4:17 pm
Please send your output and license number to support@statmodel.com.
 Daria Bakina posted on Thursday, August 06, 2015 - 12:54 pm
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 - 5:54 pm
Please send the output, data set, 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: