Mplus VERSION 7.4
MUTHEN & MUTHEN
06/06/2016 10:24 AM
INPUT INSTRUCTIONS
title: Hilbe page 112 example
data: file = affairs1.dat;
variable:
names = id male age yrsmarr kids
relig educ occup ratemarr
naffairs affair vryhap hapavg
avgmarr unhap vryrel smerel slghtrel
notrel;
usevar = naffairs kids vryhap hapavg
avgmarr vryrel smerel slghtrel notrel
yrsmarr3 yrsmarr4 yrsmarr5 yrsmarr6;
! vryhap: very happily married
! hapavg: happily married
! avgmarr: avg marriage
! vryrel: very religious
! smerel: somwhat religious
! slghtrel: slighly religious
! notrel: not religious
count = naffairs(nbi);
define:
if (yrsmarr==4) then yrsmarr3=1 else yrsmarr3=0;
if (yrsmarr==7) then yrsmarr4=1 else yrsmarr4=0;
if (yrsmarr==10) then yrsmarr5=1 else yrsmarr5=0;
if (yrsmarr==15) then yrsmarr6=1 else yrsmarr6=0;
analysis: estimator=ml;
model: naffairs on kids-yrsmarr6;
naffairs#1 on kids-yrsmarr6;
INPUT READING TERMINATED NORMALLY
Hilbe page 112 example
SUMMARY OF ANALYSIS
Number of groups 1
Number of observations 601
Number of dependent variables 1
Number of independent variables 12
Number of continuous latent variables 0
Observed dependent variables
Count
NAFFAIRS
Observed independent variables
KIDS VRYHAP HAPAVG AVGMARR VRYREL SMEREL
SLGHTREL NOTREL YRSMARR3 YRSMARR4 YRSMARR5 YRSMARR6
Estimator ML
Information matrix OBSERVED
Optimization Specifications for the Quasi-Newton Algorithm for
Continuous Outcomes
Maximum number of iterations 100
Convergence criterion 0.100D-05
Optimization Specifications for the EM Algorithm
Maximum number of iterations 500
Convergence criteria
Loglikelihood change 0.100D-02
Relative loglikelihood change 0.100D-05
Derivative 0.100D-02
Optimization Specifications for the M step of the EM Algorithm for
Categorical Latent variables
Number of M step iterations 1
M step convergence criterion 0.100D-02
Basis for M step termination ITERATION
Optimization Specifications for the M step of the EM Algorithm for
Censored, Binary or Ordered Categorical (Ordinal), Unordered
Categorical (Nominal) and Count Outcomes
Number of M step iterations 1
M step convergence criterion 0.100D-02
Basis for M step termination ITERATION
Maximum value for logit thresholds 15
Minimum value for logit thresholds -15
Minimum expected cell size for chi-square 0.100D-01
Optimization algorithm EMA
Integration Specifications
Type STANDARD
Number of integration points 15
Dimensions of numerical integration 0
Adaptive quadrature ON
Cholesky OFF
Input data file(s)
affairs1.dat
Input data format FREE
COUNT PROPORTION OF ZERO, MINIMUM AND MAXIMUM VALUES
NAFFAIRS 0.750 0 12
THE MODEL ESTIMATION TERMINATED NORMALLY
MODEL FIT INFORMATION
Number of Free Parameters 27
Loglikelihood
H0 Value -689.718
Information Criteria
Akaike (AIC) 1433.435
Bayesian (BIC) 1552.197
Sample-Size Adjusted BIC 1466.480
(n* = (n + 2) / 24)
MODEL RESULTS
Two-Tailed
Estimate S.E. Est./S.E. P-Value
NAFFAIRS ON
KIDS -0.254 0.220 -1.154 0.249
VRYHAP -0.445 0.226 -1.969 0.049
HAPAVG -0.400 0.194 -2.063 0.039
AVGMARR -0.483 0.235 -2.060 0.039
VRYREL -0.569 0.343 -1.657 0.097
SMEREL -0.461 0.273 -1.691 0.091
SLGHTREL -0.096 0.259 -0.370 0.711
NOTREL 0.099 0.266 0.374 0.709
YRSMARR3 0.018 0.311 0.057 0.955
YRSMARR4 0.536 0.320 1.672 0.094
YRSMARR5 0.548 0.313 1.753 0.080
YRSMARR6 0.759 0.283 2.680 0.007
NAFFAIRS#1 ON
KIDS -0.256 0.327 -0.783 0.433
VRYHAP 1.582 0.330 4.797 0.000
HAPAVG 1.091 0.309 3.537 0.000
AVGMARR 0.774 0.357 2.166 0.030
VRYREL 1.359 0.497 2.736 0.006
SMEREL 1.489 0.411 3.619 0.000
SLGHTREL 0.611 0.408 1.497 0.134
NOTREL 1.052 0.406 2.593 0.010
YRSMARR3 -0.762 0.408 -1.870 0.061
YRSMARR4 -0.652 0.451 -1.445 0.148
YRSMARR5 -0.986 0.457 -2.156 0.031
YRSMARR6 -0.754 0.407 -1.852 0.064
Intercepts
NAFFAIRS#1 -0.269 0.518 -0.518 0.604
NAFFAIRS 1.797 0.400 4.495 0.000
Dispersion
NAFFAIRS 0.564 0.140 4.030 0.000
QUALITY OF NUMERICAL RESULTS
Condition Number for the Information Matrix 0.274E-02
(ratio of smallest to largest eigenvalue)
DIAGRAM INFORMATION
Use View Diagram under the Diagram menu in the Mplus Editor to view the diagram.
If running Mplus from the Mplus Diagrammer, the diagram opens automatically.
Diagram output
c:\users\gryphon\desktop\chapter6\ex6.5.dgm
Beginning Time: 10:24:37
Ending Time: 10:24:38
Elapsed Time: 00:00:01
MUTHEN & MUTHEN
3463 Stoner Ave.
Los Angeles, CA 90066
Tel: (310) 391-9971
Fax: (310) 391-8971
Web: www.StatModel.com
Support: Support@StatModel.com
Copyright (c) 1998-2015 Muthen & Muthen
Back to examples