You need to remove the variable names from the first record of the data file.
Anonymous posted on Sunday, September 18, 2005 - 6:39 pm
I am new to Mplus. Could you give me some advices on the error messages? My input is:
TITLE: this is an example of a CFA with categorical factor indicators DATA: FILE IS J_201.dat; VARIABLE: NAMES ARE Item1-Item12; CATEGORICAL ARE Item1-Item12; MODEL: f1 BY Item2 Item5 Item6 Item9; f2 BY Item1 Item3 Item4 Item7 Item8 Item12; f3 BY Item10 Item11
The error messages are:
ERROR The number of observations is 0. Check your data and format statement. Data file: J_201.dat *** ERROR Invalid symbol in data file: "2.001.001.001.001.00" at record #: 1, field #: 1
It looks like your data are fixed format and you are reading them as free format. Try adding a FORMAT statement. If this does not help, send your input, data, output, and license number to email@example.com.
Anonymous posted on Wednesday, September 21, 2005 - 4:38 am
You may also use third party software such as DBMS copy to convert the SAS data file to ASCII format. When doing this be sure to strip the variable names from the file as mentioned in a previous post. Once inside Mplus simply arrange your variable names in accordance with the arrangement of the data lines.
HWard posted on Wednesday, December 14, 2005 - 12:25 pm
Hi - just testing out MPlus, trying to run a simple logistic regression (ordinal education variable NEWEDUC predicting overweight vs. healthy weight (DBMI). here's the code:
DATA: FILE IS "C:\Documents and Settings\Owner\My Documents\MINI_TRY.TXT"; FORMAT IS FREE;
VARIABLE: NAMES ARE AGE NEWEDUC DBMI; USEVARIABLES DBMI NEWEDUC AGE; CATEGORICAL ARE DBMI; MISSING ARE . ;
ANALYSIS: TYPE = LOGISTIC ; MODEL: DBMI ON NEWEDUC;
And here are the error messages: *** WARNING in Model command Variable is uncorrelated with all other variables: AGE *** WARNING in Model command All least one variable is uncorrelated with all other variables in the model. Check that this is what is intended. *** ERROR LOGISTIC analysis is only available with one categorical y-variable.
the warnings re: age are confusing as previous analyses with SAS indicated that there are significant correlations between AGE and DBMI, and AGE and NEWEDUC. Also, the ERROR message doesn't makes sense to me.
You don't have the variable age in the MODEL command. Is it a covariate?
HWard posted on Wednesday, December 14, 2005 - 2:22 pm
Ahhh, yes. That explains the error there - seems to take care of the warning too. Thanks!
HWard posted on Wednesday, December 14, 2005 - 2:51 pm
One more question: my SAS data set identifies missing variables as a period (.) but when I export the data using the SAS export wizard to either comma- or tab-delineated form (saved as a .txt file), the missing values show up as blank and aren't read by MPlus since the data is in free format. Has anyone else run into this problem?
I don't know the solution to this problem but I have seen it. I would imagine that SAS has an option to say what you want the missing value to be saved as.
Magdalena posted on Monday, February 27, 2006 - 12:33 pm
I am trying to run a two-level confirmatory factor analysis with multiply imputed data. Thus, I have followed the instructions on addressing imputation. After running the analysis, I get no output file. Also, when I check the output file it says "Input reading terminated normally" but it has no results. Do you know why this could be?
I would need to see your input, imputed data, output, and license number at firstname.lastname@example.org. Try to replicate it with only two of the inputed data sets.
Haibei Liu posted on Monday, June 16, 2008 - 1:00 pm
Hi, I am new to Mplus. I export a dataset in sas to mplus, first saved as a .txt file. It looks ok, but after I checked sample statistic, the data didn't read correctly. The mean of wmistan is actually the mean of dxagecat which is a categorical variable and just in front of wmistan . I attached part of the short programming below: VARIABLE: NAMES ARE cogid dxage gender regimen dx_inter dxagecat wmistan memoryt memorys; missing are .; USEVARIABLES ARE wmistan memoryt memorys t_memory; define: t_memory=-1*memorys;
MODEL:WM BY t_memory wmistan memoryt;
output: sampstat ;
Thanks very much for your time and any suggestions.
This is a support question. Please send your input, data, output, and license number to email@example.com. It sounds like you don't have the variable names in the same order as the variables in the data set.
Hi Linda. Can you tell me if Mplus does anything with the variables in the dataset if they're not in the usevariables list? I'm having a problem where I do the same analysis in a dataset containing two additional variables (racesex and race), which are not in my usevariables or model statements, but I get different results than I get when those variables are not in the dataset. I have checked very carefully several times to make sure that the "names are" statement is correct. I get the following message (which doesn't appear when I do the analysis in the dataset without the racesex and race variables), plus only (exactly) half of my observations are used (4649 instead of 9298) and my estimates are way off:
ONE OR MORE PARAMETERS WERE FIXED TO AVOID SINGULARITY OF THE INFORMATION MATRIX. THE SINGULARITY IS MOST LIKELY BECAUSE THE MODEL IS NOT IDENTIFIED, OR BECAUSE OF EMPTY CELLS IN THE JOINT DISTRIBUTION OF THE CATEGORICAL VARIABLES IN THE MODEL. THE FOLLOWING PARAMETERS WERE FIXED: 71
Never mind the above post. I discovered that the model was ignoring my "data is" path because it was on two lines and was instead using an older version of the data that was in the same folder as the program. I should add that I think it would be safer if MPlus always issued a warning when there's something wrong with the path specification and it instead reads data from another folder. I'll admit that I probably shouldn't have different versions of the data with the same name in different folders, but I'd still prefer to get a warning. Maybe for the next version?
Hi, I'm very new to Mplus and I'm have some issues with getting my analysis to run.
TITLE: DATA: FILE IS CANT.Mplus.2.dat; Define: IntEO = Eth*Ost; VARIABLE: NAMES ARE sub cond age gend Belon Self Cont Mean Need RDAt DehMec DehAn; NAMES ARE RDbe TotRD TotDeh DPos DNeg ACt RRom Eth Lang Ost INT; USEVARIABLES ARE Belon Self Cont Mean Need DehAn Eth Lang Ost IntEO; ANALYSIS: estimator = ; bootstrap = 1000; MODEL: Need ON Eth Ost IntEO Lang; DehAn ON Need; DehAn ON Eth Ost IntEO Lang;
*** WARNING in MODEL command Variable is uncorrelated with all other variables: BELON *** WARNING in MODEL command Variable is uncorrelated with all other variables: SELF *** WARNING in MODEL command At least one variable is uncorrelated with all other variables in the model. Check that this is what is intended.
I know someone posted something similar about but it didn't really help me. As I haven't included the variables BELON etc I wasn't sure why they would have anything to do with the analysis.
You have the variable belon and self on the USEVARIABLES list but not in the MODEL command. All variables on the USEVARIABLE list are used in the analysis. If this is not what is intended, you should remove belon and self from the USEVARIABLES list.
Open the data file in the Mplus Editor. You will see the invalid character at the beginning of the data file. Delete it and save the data. The latest version of Mplus seems to have introduced this problem.
Oops! It is the latest version of SPSS that introduced the problem.
Timothy posted on Thursday, September 05, 2013 - 9:04 am
Dear Prof. Muthen,
I experienced the same problem with the new SPSS version when I converted the SPSS data file to MPlus data file. I tried your suggestion using the Mplus editor to fix the invalid character at the beginning of the data file. However, it still didn't work. Could you please advise what else I could do to fix the problem?
I suspect you have blanks in your data set. You will get, means, variances, and covariances once to data reading problem is solved. SPSS uses blanks for some missing data. Please send the data, output, and your license number to firstname.lastname@example.org if you cannot see the problem.
To transfer files from SAS into Mplus, I have been using the PUT command in SAS for many years without any problems. Lately, though, I get errors. I got this error: *** ERROR Non-missing blank found in data file at record #30, field #: 333
Can you help me with the syntax which will create a data file from SAS?
Thank you for your response. I figured out that SAS was putting value labels into the file and I was able to strip the value labels and now things are better. Strange that it started happening after years of using the same statement with no issues. Of course,it's a SAS issue, not an Mplus issue.
Adam Shen posted on Thursday, December 28, 2017 - 12:08 pm
Hello,I've been trying to correct the errors I consistently got concerning a particular variable in a record of my file. To begin with, I loaded my dat file correctly, ran cfa analyses correctly, but as soon as I included this particular variable (GRADE_POINT) in usevariables and in the model for an additional path analyses (GRADE_POINT on ALEKS_deep SPQ_deep SPQ_surface ALEKS_surface), I got: *** ERROR The number of observations is 0. Check your data and format statement. Data file: Trial.dat *** ERROR Invalid symbol in data file: "Warning" at record #: 1, field #: 101
I then checked the dat file in Mplus, and didn't find said "warning" symbol; tried deleting the whole record from the input file, didn't help either.
Any suggestion about what happened, and how to fix it? I'll be happy to send over my input file if helpful.