File: LCAlazarsfeld.mxo

package info (click to toggle)
r-cran-openmx 2.21.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 14,412 kB
  • sloc: cpp: 36,577; ansic: 13,811; fortran: 2,001; sh: 1,440; python: 350; perl: 21; makefile: 5
file content (378 lines) | stat: -rw-r--r-- 9,809 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
  
  ** Mx startup successful **
  
   **Mx-OSX version 1.69**
 !------------------------------------------------------+
 ! Latent class analysis via Mx                         |
 ! marginal ml again                                    |
 ! data from http://www.people.vcu.edu/~nhenry/LSA50.htm|
 ! see                                                  |
 ! Latent Class Probs Item 1 Item 2 Item 3 Item 4       |
 ! .4243              .9240 .6276 .5704 .5125           |
 ! .5757              .4324 .1871 .1008 .0635           |
 ! Mx recovers:                                         |
 ! .4440    0.90736    0.61444    0.55828    0.50176    |
 ! .5560    0.42838    0.18218    .09394      .05627    |
 !------------------------------------------------------+
 
 #ngroups  2    ! number of groups in run
 
 
 The following MX script lines were read for group    1
 
 #NGROUPS  2
  Note: #NGroup set number of groups to           2
  
 #define $nvar 5  ! Number of variables altogether, before selection
 #define nclass 2
 #define $nclass 2
 #define nv 4    ! number of variables in model
 #define ncov 0   ! number of covariates
 #define nclassncov 0 ! nclass * ncov
 #define ncnv 8  ! number of variables * number of classes
 #define $allvar1 Armyrun Favatt squaredeal welfare freq
 #define $covariates FHTTLPR1 FHTTLPR2
 #define $variables Armyrun Favatt squaredeal welfare freq
 #define $frequencies TRUE
 #define $freqlabel freq
 #define maxcat 1  ! Maximum score of any item
 #define maxcatnc 2  ! Must be maxcat times nclass
 !-------------------------------------------------------------------
 Group 1: Fit the model
  Data Ninput=$nvar  Nmodel=$nclass
  ORdinal File=lazarsfeld.ord
  Ordinal data read initiated
  Note: Maximum ordinal/rectangular record length is:         1000
  Note: It be increased by maxrec= parameter on the data line.
  
  NOTE: Rectangular file contained    16 records with data
        that contained a total of     80 observations
  
  LAbels
 $allvar1
 
 !Select if sex = 0
  SElect
 #if ncov > 0
  $variables
  $covariates ;
  Definition $covariates ;
 #else
  $variables  ;
 #endif
 #if $frequencies = TRUE
  Definition $freqlabel  ;
  
  NOTE: Selection yields   16 data vectors for analysis
  NOTE: Vectors contain a total of    80 observations
  
  
  NOTE: Definition yields   16 data vectors for analysis
  NOTE: Vectors contain a total of    64 observations
  
 #end if
 
   Begin matrices;
  
     A full nclass 1
  #if ncov > 0
     P unit nv ncov
     K Full nv nclassncov  ! regressions of response probabilities on covariates
     S full ncov 1   ! vector of observed covariates
     X full nclass ncov    ! For regression of class membership probs on covaria
 tes
  #else
     P unit nv 1
     K Full nv nclass     ! Not required except to make algebra work with no cov
 ariates
     D full 1 1      ! Not required except to make algebra work
     S full 1 1      ! Not required except to make algebra work
     X full nclass 1    ! For regression of class membership probs on covariates
  #endif
     E full 1 nv
     F unit maxcat 1
     G lower maxcat maxcat
     T full maxcatnc nv Free  ! thresholds, z-score metric for class probabiliti
 es
                              ! note that columns are thresholds within variable
 s
     I iden nclass nclass
     Q full 1 1               ! for frequency if used
     R iden nv nv
     U unit 1 1
     V unit nv 1
     W full nclass 1 free  ! class membership probabilities
   End Matrices;
  !
  ! Be kind to Mx, fix thresholds that are not going anywhere
  !
   Value 1 G 1 1 - G maxcat maxcat
  #if ncov > 0
   Specify S $covariates
  #endif
  #if $frequencies = TRUE
   Specify Q $freqlabel
  #end if
   Matrix W .2 .8
 
   Begin Algebra;
   End Algebra;
 
   Thresholds  (I@G)*T+(K*(I@S))' ;
   Covariance  R;
  #if $frequencies = TRUE
    Frequency Q;
  #end if
  #if ncov > 0
    Specify S $covariates
   #endif
   #if $frequencies = TRUE
    Specify Q $freqlabel
   #end if
    Matrix W .2 .8
 
    Begin Algebra;
    End Algebra;
 
    Thresholds  (I@G)*T+(K*(I@S))' ;
    Covariance  R;
   #if $frequencies = TRUE
     Frequency Q;
   #end if
   #if ncov > 0
    Weight      (W+X*S)@(\sum(W+X*S)~);  ! adjusted for covariates
   #else
    Weight      W ;
   #endif
    Option onecov
    Option func=1.e-9
   End Group;
 
 
 The following MX script lines were read for group    2
 
 
   Constrain Un-regressed Weights to sum to 1
    Constraint
    Begin Matrices;
     W full nclass 1 = W1
     I unit 1 1
    End Matrices;
 
    Constraint I = \sum(W);
   End
  
  
  Summary of VL file data for group            1
  
                 FREQ    ARMYRUN     FAVATT SQUAREDEAL    WELFARE
     Code     -1.0000     1.0000     2.0000     3.0000     4.0000
   Number     16.0000    16.0000    16.0000    16.0000    16.0000
     Mean     62.5000     0.5000     0.5000     0.5000     0.5000
 Variance   3973.2500     0.2500     0.2500     0.2500     0.2500
  Minimum      3.0000     0.0000     0.0000     0.0000     0.0000
  Maximum    229.0000     1.0000     1.0000     1.0000     1.0000
  
  
  PARAMETER SPECIFICATIONS
  
  GROUP NUMBER:           1
  
Group 1: Fit the model                                                                                                          
  
  MATRIX A
 This is a FULL matrix of order    2 by    1
  It has no free parameters specified
  
  MATRIX D
 This is a FULL matrix of order    1 by    1
  It has no free parameters specified
  
  MATRIX E
 This is a FULL matrix of order    1 by    4
  It has no free parameters specified
  
  MATRIX F
 This is a UNIT matrix of order    1 by    1
  
  MATRIX G
 This is a LOWER TRIANGULAR matrix of order    1 by    1
  It has no free parameters specified
  
  MATRIX I
 This is an IDENTITY matrix of order    2 by    2
  
  MATRIX K
 This is a FULL matrix of order    4 by    2
  It has no free parameters specified
  
  MATRIX P
 This is a UNIT matrix of order    4 by    1
  
  MATRIX Q
 This is a FULL matrix of order    1 by    1
     1
 1  -1
  
  MATRIX R
 This is an IDENTITY matrix of order    4 by    4
  
  MATRIX S
 This is a FULL matrix of order    1 by    1
  It has no free parameters specified
  
  MATRIX T
 This is a FULL matrix of order    2 by    4
    1 2 3 4
 1  1 2 3 4
 2  5 6 7 8
  
  MATRIX U
 This is a UNIT matrix of order    1 by    1
  
  MATRIX V
 This is a UNIT matrix of order    4 by    1
  
  MATRIX W
 This is a FULL matrix of order    2 by    1
     1
 1   9
 2  10
  
  MATRIX X
 This is a FULL matrix of order    2 by    1
  It has no free parameters specified
  
  GROUP NUMBER:           2
  
Constrain Un-regressed Weights to sum to 1                                                                                      
  
  MATRIX I
 This is a UNIT matrix of order    1 by    1
  
  MATRIX W
 This is a FULL matrix of order    2 by    1
     1
 1   9
 2  10
  
  Mx starting optimization; number of parameters =           10
  
  
  MX PARAMETER ESTIMATES
  
  GROUP NUMBER:           1
  
Group 1: Fit the model                                                                                                          
  
  MATRIX A
 This is a FULL matrix of order    2 by    1
          1
 1   0.0000
 2   0.0000
  
  MATRIX D
 This is a FULL matrix of order    1 by    1
          1
 1   0.0000
  
  MATRIX E
 This is a FULL matrix of order    1 by    4
          1       2       3       4
 1   0.0000  0.0000  0.0000  0.0000
  
  MATRIX F
 This is a UNIT matrix of order    1 by    1
  
  MATRIX G
 This is a LOWER TRIANGULAR matrix of order    1 by    1
          1
 1   1.0000
  
  MATRIX I
 This is an IDENTITY matrix of order    2 by    2
  
  MATRIX K
 This is a FULL matrix of order    4 by    2
          1       2
 1   0.0000  0.0000
 2   0.0000  0.0000
 3   0.0000  0.0000
 4   0.0000  0.0000
  
  MATRIX P
 This is a UNIT matrix of order    4 by    1
  
  MATRIX Q
 This is a FULL matrix of order    1 by    1
             1
 1    229.0000
  
  MATRIX R
 This is an IDENTITY matrix of order    4 by    4
  
  MATRIX S
 This is a FULL matrix of order    1 by    1
          1
 1   0.0000
  
  MATRIX T
 This is a FULL matrix of order    2 by    4
             1          2          3          4
 1     -1.3247    -0.2909    -0.1466    -0.0044
 2      0.1805     0.9071     1.3169     1.5869
  
  MATRIX U
 This is a UNIT matrix of order    1 by    1
  
  MATRIX V
 This is a UNIT matrix of order    4 by    1
  
  MATRIX W
 This is a FULL matrix of order    2 by    1
          1
 1   0.4440
 2   0.5560
  
  MATRIX X
 This is a FULL matrix of order    2 by    1
          1
 1   0.0000
 2   0.0000
  
  GROUP NUMBER:           2
  
Constrain Un-regressed Weights to sum to 1                                                                                      
  
  MATRIX I
 This is a UNIT matrix of order    1 by    1
  
  MATRIX W
 This is a FULL matrix of order    2 by    1
          1
 1   0.4440
 2   0.5560
  
 Your model has   10 estimated parameters and     65 Observed statistics
 Observed statistics include   1 constraints.
  
 -2 times log-likelihood of data >>>  4696.444
 Degrees of freedom >>>>>>>>>>>>>>>>        55
 Akaike's Information Criterion >>>>  4586.444
 Bayesian Information Criterion >>>>  2271.976
 Sample size Adjusted BIC       >>>>  2356.133
 Deviance Information Criterion >>>>  2322.518
  
 This problem used  0.0% of my workspace
  
 Task                     Time elapsed (DD:HH:MM:SS)
 Reading script & data      0: 0: 0: 0.01
 Execution                  0: 0: 0: 0.03
 TOTAL                      0: 0: 0: 0.04
  
 Total number of warnings issued:           0
 ______________________________________________________________________________
 
 
  
 ______________________________________________________________________________