Susan Scott posted on Wednesday, November 22, 2006 - 10:39 am
I have the feeling I may be missing something very obvious, but when I add the following statement to my model
DEFINE: sf36 = (pcs_ob + mcs_ob)/2;
with sf36 used in the following model statement:
MODEL: HRQL BY eqsum eq5dw10 hu3m eqtherm sf36;
I get the error message:
** FATAL ERROR
THE SAMPLE COVARIANCE MATRIX COULD NOT BE INVERTED. THIS CAN OCCUR IF A VARIABLE HAS NO VARIATION, OR IF TWO VARIABLES ARE PERFECTLY CORRELATED, OR IF THE NUMBER OF OBSERVATIONS IS NOT GREATER THAN THE NUMBER OF VARIABLES. CHECK YOUR DATA. THIS PROBLEM IS DUE TO:
VARIABLE : SF36
I am able to run the model with each of these variables individually, ie. pcs_ob and mcs_ob instead of sf_36. Also, I tried defining sf36 as sf36=pcs_ob, and I still get this message. So I am guessing the problem is with my definition statement.
Please send your input, data, output, and license number to firstname.lastname@example.org. It is not obvious what the problem is without further information.
David Bard posted on Wednesday, November 22, 2006 - 9:44 pm
It's not obvious to me why, but adding a define command to my syntax resulted in loss of observations for a model that did not even contain the variables used in the define command. The define syntax was used for a previous model and was simply left in this new model after a cut and paste. It's not a big deal, I will simply exclude define commands not needed for a given model, but can you explain why this happens? tx, db.
If it helps, here's the define syntax: DEFINE: citpreg = citynum*pregnant; twkhighc = twkhigh; if twkhigh > 5 then twkhighc = 5; twkamhdc = twkamhd2; if twkamhd2 > 5 then twkamhdc = 5; formrbc = formrb;
I want to add a random variable to an existing variable. I do not plan to do this repeatedly like in a Monte Carlo study. I just need to use a command like DEFINE y=x+e, where: y - new variable x - old variable e - random variable from the normal distribution with zero mean and a standard error I can choose. Can/(how do) I do this in Mplus? Thank you.
I wish to create MD_A from G12A and G15A where G12A tests presence of a condition (yes=1, no=5) while G15A scores severity scale' at 3 levels if checked 'yes' on G12A but assigns 'missing' if checked 'no'.
I wish to combine G12A and G15A in a new 4-level scale MD_A where 0 indicates absence of condition. Below is the partial syntax and error I am getting.
I don't understand your question. Please send outputs that illustrate what you are saying along with your license number to email@example.com.
Kerry Lee posted on Monday, December 06, 2010 - 3:15 am
Dear Dr. Muthen,
Is it necessary to list both the original variables and new variables created using DEFINE in USEVARIABLES? I thought this was the case after reading the User's Guide. However, when I did this, both original and new were included in a CFA model even though only the new variables were specified in MODEL.
On a related matter, I ran the same analysis using either the original and new variables (original/x to bring the scale back to 1 - 10). The raw bivariate correlations naturally remain the same, but the standardized CFA factor loadings and correlations are different. Are such differences to be expected?
The difference in time needed to run the two analyses was astonishing: 37 min versus 56 sec (scaled).
Every variable specified on the USEVARIABLES list is included in the model to be estimated. New variables created using DEFINE must be placed on the USEVARIABLES list if they are used in the MODEL command. If any original variables are used in the MODEL command, the new variables created in DEFINE must follow them on the USEVARIABLES list.
Large variances make model convergence more difficult so this could increase the time. I would have to see the two outputs and your license number at firstname.lastname@example.org to comment on the standardized coefficients.
Luo Wenshu posted on Thursday, February 19, 2015 - 2:53 am
Dear Dr. Muthen,
I am using Mplus 7.3 doing twolevel analysis. I created cluster means for some observed variables and want to use these cluster means at level 2. I then listed these cluster means under original variables on the Usevariables list. Then running analysis led to the error that the number of record is 0. Currently I put Define comment down following the usevariables list. How should I position usevariables and define command?