|
|
|
||||
|
|
|||||
To indicate to Mplus that you want basic descriptive statistics (means, variances, covariances and correlations), you need to use the Type = basic; in the Analysis command block.
We will use the hsb2.dat datafile and hsb2.inp command file created by Stata in the previous section to demonstrate the descriptive statistics.
Title:
Stata2Mplus convertsion for hsb2.dta
List of variables converted shown below
id :
female :
0: male
1: female
race :
1: hispanic
2: asian
3: african-amer
4: white
ses :
1: low
2: middle
3: high
schtyp : type of school
1: public
2: private
prog : type of program
1: general
2: academic
3: vocation
read : reading score
write : writing score
math : math score
science : science score
socst : social studies score
Data:
File is hsb2.dat ;
Variable:
Names are
id female race ses schtyp prog read write math science socst;
Missing are all (-9999) ;
Usevariables are
id female race ses schtyp prog read write math science socst;
Analysis:
Type = basic ;
Here is the output that Mplus generates.
SUMMARY OF ANALYSIS
Number of groups 1
Number of observations 200
Number of dependent variables 11
Number of independent variables 0
Number of continuous latent variables 0
Observed dependent variables
Continuous
ID FEMALE RACE SES SCHTYP PROG
READ WRITE MATH SCIENCE SOCST
Estimator ML
Information matrix EXPECTED
Maximum number of iterations 1000
Convergence criterion 0.500D-04
Maximum number of steepest descent iterations 20
Input data file(s)
hsb2.dat
Input data format FREE
RESULTS FOR BASIC ANALYSIS
SAMPLE STATISTICS
Means
ID FEMALE RACE SES SCHTYP
________ ________ ________ ________ ________
1 100.500 0.545 3.430 2.055 1.160
Means
PROG READ WRITE MATH SCIENCE
________ ________ ________ ________ ________
1 2.025 52.230 52.775 52.645 51.850
Means
SOCST
________
1 52.405
Covariances
ID FEMALE RACE SES SCHTYP
________ ________ ________ ________ ________
ID 3350.000
FEMALE -2.520 0.249
RACE 45.050 0.001 1.081
SES 8.842 -0.045 0.147 0.525
SCHTYP 10.261 0.003 0.041 0.036 0.135
PROG -2.319 0.001 -0.036 0.009 -0.024
READ 88.196 -0.272 2.594 2.178 0.325
WRITE 102.420 1.214 2.168 1.424 0.443
MATH 118.877 -0.137 1.973 1.849 0.338
SCIENCE 184.181 -0.631 3.296 2.028 0.235
SOCST 113.902 0.281 2.121 2.581 0.382
Covariances
PROG READ WRITE MATH SCIENCE
________ ________ ________ ________ ________
PROG 0.477
READ -0.956 105.123
WRITE -1.185 57.997 89.844
MATH -0.971 63.615 54.829 87.768
SCIENCE -1.298 63.969 53.534 58.504 98.028
SOCST -1.447 68.409 61.544 54.763 49.438
Covariances
SOCST
________
SOCST 115.257
Correlations
ID FEMALE RACE SES SCHTYP
________ ________ ________ ________ ________
ID 1.000
FEMALE -0.087 1.000
RACE 0.749 0.001 1.000
SES 0.211 -0.125 0.195 1.000
SCHTYP 0.482 0.015 0.108 0.137 1.000
PROG -0.058 0.004 -0.050 0.017 -0.095
READ 0.149 -0.053 0.243 0.293 0.086
WRITE 0.187 0.256 0.220 0.207 0.127
MATH 0.219 -0.029 0.203 0.272 0.098
SCIENCE 0.321 -0.128 0.320 0.283 0.065
SOCST 0.183 0.052 0.190 0.332 0.097
Correlations
PROG READ WRITE MATH SCIENCE
________ ________ ________ ________ ________
PROG 1.000
READ -0.135 1.000
WRITE -0.181 0.597 1.000
MATH -0.150 0.662 0.617 1.000
SCIENCE -0.190 0.630 0.570 0.631 1.000
SOCST -0.195 0.621 0.605 0.544 0.465
Correlations
SOCST
________
SOCST 1.000
Beginning Time: 11:12:12
Ending Time: 11:12:12
Elapsed Time: 00:00:00
Next, we will look at a dataset with missing data. This time we will not include the id varaible in the analyses.
We will use the hsbmis.dat datafile and hsbmis.inp command file created by Stata in the previous section to demonstrate the descriptive statistics.
Title:
Stata2Mplus convertsion for hsbmis.dta
List of variables converted shown below
id :
female :
0: male
1: female
race :
1: hispanic
2: asian
3: african-amer
4: white
ses :
1: low
2: middle
3: high
schtyp : type of school
1: public
2: private
prog : type of program
1: general
2: academic
3: vocation
read : reading score
write : writing score
math : math score
science : science score
socst : social studies score
Data:
File is hsbmis.dat ;
Variable:
Names are
id female race ses schtyp prog read write math science socst;
Missing are all (-9999) ;
Usevariables are
female race ses schtyp prog read write math science socst;
Analysis:
type = basic missing ; ! note we added missing
Here is the output generated by Mplus.
SUMMARY OF ANALYSIS
Number of groups 1
Number of observations 200
Number of dependent variables 10
Number of independent variables 0
Number of continuous latent variables 0
Observed dependent variables
Continuous
FEMALE RACE SES SCHTYP PROG READ
WRITE MATH SCIENCE SOCST
Estimator ML
Information matrix OBSERVED
Maximum number of iterations 1000
Convergence criterion 0.500D-04
Maximum number of steepest descent iterations 20
Maximum number of iterations for H1 2000
Convergence criterion for H1 0.100D-03
Input data file(s)
hsbmis.dat
Input data format FREE
SUMMARY OF DATA
Number of patterns 7
SUMMARY OF MISSING DATA PATTERNS
MISSING DATA PATTERNS
1 2 3 4 5 6 7
FEMALE x x x x x x
RACE x x x x x x x
SES x x x x x x x
SCHTYP x x x x x x x
PROG x x x x x x x
READ x x x x x x
WRITE x x x x x x
MATH x x x x x x
SCIENCE x x x x x x
SOCST x x x x x x
MISSING DATA PATTERN FREQUENCIES
Pattern Frequency Pattern Frequency Pattern Frequency
1 138 4 12 7 6
2 5 5 14
3 14 6 11
COVARIANCE COVERAGE OF DATA
Minimum covariance coverage value 0.100
PROPORTION OF DATA PRESENT
Covariance Coverage
FEMALE RACE SES SCHTYP PROG
________ ________ ________ ________ ________
FEMALE 0.970
RACE 0.970 1.000
SES 0.970 1.000 1.000
SCHTYP 0.970 1.000 1.000 1.000
PROG 0.970 1.000 1.000 1.000 1.000
READ 0.915 0.945 0.945 0.945 0.945
WRITE 0.900 0.930 0.930 0.930 0.930
MATH 0.910 0.940 0.940 0.940 0.940
SCIENCE 0.900 0.930 0.930 0.930 0.930
SOCST 0.945 0.975 0.975 0.975 0.975
Covariance Coverage
READ WRITE MATH SCIENCE SOCST
________ ________ ________ ________ ________
READ 0.945
WRITE 0.875 0.930
MATH 0.885 0.870 0.940
SCIENCE 0.875 0.860 0.870 0.930
SOCST 0.920 0.905 0.915 0.905 0.975
RESULTS FOR BASIC ANALYSIS
ESTIMATED SAMPLE STATISTICS
Means
FEMALE RACE SES SCHTYP PROG
________ ________ ________ ________ ________
1 0.546 3.430 2.055 1.160 2.025
Means
READ WRITE MATH SCIENCE SOCST
________ ________ ________ ________ ________
1 52.326 52.561 52.768 51.852 52.354
Covariances
FEMALE RACE SES SCHTYP PROG
________ ________ ________ ________ ________
FEMALE 0.247
RACE 0.015 1.075
SES -0.041 0.146 0.522
SCHTYP 0.003 0.041 0.036 0.134
PROG 0.008 -0.036 0.009 -0.024 0.474
READ -0.259 2.626 2.281 0.364 -0.959
WRITE 1.193 2.053 1.388 0.475 -1.202
MATH -0.253 2.076 1.658 0.237 -1.117
SCIENCE -0.596 3.066 1.859 0.295 -1.461
SOCST 0.256 2.042 2.548 0.388 -1.435
Covariances
READ WRITE MATH SCIENCE SOCST
________ ________ ________ ________ ________
READ 104.556
WRITE 56.806 88.288
MATH 61.093 53.278 84.485
SCIENCE 64.333 54.832 58.322 94.201
SOCST 67.681 60.178 50.695 50.635 115.474
Correlations
FEMALE RACE SES SCHTYP PROG
________ ________ ________ ________ ________
FEMALE 1.000
RACE 0.029 1.000
SES -0.113 0.195 1.000
SCHTYP 0.014 0.108 0.137 1.000
PROG 0.024 -0.050 0.017 -0.095 1.000
READ -0.051 0.248 0.309 0.097 -0.136
WRITE 0.255 0.211 0.204 0.138 -0.186
MATH -0.055 0.218 0.250 0.070 -0.176
SCIENCE -0.123 0.305 0.265 0.083 -0.219
SOCST 0.048 0.183 0.328 0.099 -0.194
Correlations
READ WRITE MATH SCIENCE SOCST
________ ________ ________ ________ ________
READ 1.000
WRITE 0.591 1.000
MATH 0.650 0.617 1.000
SCIENCE 0.648 0.601 0.654 1.000
SOCST 0.616 0.596 0.513 0.485 1.000
MAXIMUM LOG-LIKELIHOOD VALUE FOR THE UNRESTRICTED (H1) MODEL IS -4148.435
Beginning Time: 09:57:46
Ending Time: 09:57:47
Elapsed Time: 00:00:01
UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services