```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(nbh);

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;
naffairs#1 on  kids-yrsmarr6;

analysis:
estimator=ml;

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
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.611

Information Criteria

Akaike (AIC)                    1433.222
Bayesian (BIC)                  1551.984
Sample-Size Adjusted BIC        1466.266
(n* = (n + 2) / 24)

MODEL RESULTS

Two-Tailed
Estimate       S.E.  Est./S.E.    P-Value

NAFFAIRS   ON
KIDS              -0.257      0.220     -1.167      0.243
VRYHAP            -0.437      0.226     -1.931      0.054
HAPAVG            -0.382      0.193     -1.973      0.049
AVGMARR           -0.482      0.235     -2.054      0.040
VRYREL            -0.570      0.344     -1.658      0.097
SMEREL            -0.454      0.271     -1.679      0.093
SLGHTREL          -0.106      0.258     -0.410      0.682
NOTREL             0.098      0.263      0.375      0.708
YRSMARR3           0.043      0.310      0.140      0.889
YRSMARR4           0.539      0.323      1.671      0.095
YRSMARR5           0.570      0.316      1.804      0.071
YRSMARR6           0.781      0.288      2.711      0.007

NAFFAIRS#1 ON
KIDS              -0.182      0.310     -0.586      0.558
VRYHAP             1.607      0.311      5.168      0.000
HAPAVG             1.136      0.290      3.910      0.000
AVGMARR            0.828      0.332      2.491      0.013
VRYREL             1.424      0.455      3.131      0.002
SMEREL             1.518      0.375      4.052      0.000
SLGHTREL           0.593      0.369      1.606      0.108
NOTREL             0.988      0.370      2.671      0.008
YRSMARR3          -0.717      0.381     -1.883      0.060
YRSMARR4          -0.743      0.429     -1.734      0.083
YRSMARR5          -1.064      0.433     -2.457      0.014
YRSMARR6          -0.889      0.388     -2.293      0.022

Intercepts
NAFFAIRS#1        -0.108      0.477     -0.226      0.821
NAFFAIRS           1.773      0.397      4.469      0.000

Dispersion
NAFFAIRS           0.573      0.144      3.970      0.000

QUALITY OF NUMERICAL RESULTS

Condition Number for the Information Matrix              0.328E-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.7.dgm

Beginning Time:  10:24:41
Ending Time:  10:24:41
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

```