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(nb);
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;
model: naffairs on kids-yrsmarr6;
analysis: estimator=ml;
plot:
type = plot3;
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 14
Loglikelihood
H0 Value -724.240
Information Criteria
Akaike (AIC) 1476.480
Bayesian (BIC) 1538.060
Sample-Size Adjusted BIC 1493.614
(n* = (n + 2) / 24)
MODEL RESULTS
Two-Tailed
Estimate S.E. Est./S.E. P-Value
NAFFAIRS ON
KIDS 0.087 0.311 0.280 0.779
VRYHAP -1.390 0.376 -3.699 0.000
HAPAVG -0.980 0.365 -2.683 0.007
AVGMARR -0.971 0.429 -2.261 0.024
VRYREL -1.513 0.545 -2.778 0.005
SMEREL -1.467 0.465 -3.157 0.002
SLGHTREL -0.414 0.483 -0.857 0.391
NOTREL -0.308 0.474 -0.649 0.516
YRSMARR3 0.668 0.398 1.681 0.093
YRSMARR4 1.335 0.446 2.993 0.003
YRSMARR5 1.189 0.448 2.653 0.008
YRSMARR6 1.427 0.387 3.686 0.000
Intercepts
NAFFAIRS 0.816 0.626 1.303 0.193
Dispersion
NAFFAIRS 6.760 0.761 8.888 0.000
QUALITY OF NUMERICAL RESULTS
Condition Number for the Information Matrix 0.213E-02
(ratio of smallest to largest eigenvalue)
PLOT INFORMATION
The following plots are available:
Histograms (sample values)
Scatterplots (sample values)
Sample proportions, estimated and conditional estimated probabilities
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.4.dgm
Beginning Time: 10:24:34
Ending Time: 10:24:34
Elapsed Time: 00:00:00
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