-
Notifications
You must be signed in to change notification settings - Fork 7
/
mkheader_mi.ado
84 lines (74 loc) · 2.47 KB
/
mkheader_mi.ado
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
*!mkheader_mi version 0.1.0
*!Written 22Apr2023
*!Written by Sergio Venturini and Mehmet Mehmetoglu
*!The following code is distributed under GNU General Public License version 3 (GPL-3)
program mkheader_mi
version 15.1
syntax [, Wscheme(string) Init(string) DIGits(integer 5) noSTRuctural ///
RAWsum CONsistent ]
/* Options:
--------
digits(integer 5) --> number of digits to display (default 5)
nostructural --> indicator of whether the model includes a
structural part
rawsum --> scores are raw sum of indicators
consistent --> indicator for consistent PLS (PLSc)
*/
local tol = e(tolerance)
display
display as text "Multiple-imputation estimates"
// display
if ("`consistent'" == "") {
local header "Partial least squares SEM"
}
else {
local header "Consistent partial least squares (PLSc) SEM"
}
local nobs: display _skip(0) "`header'" _col(49) ///
"Number of obs" _col(69) "=" _skip(5) //string(e(N))
display as text "`nobs'" _continue
display as result e(N)
if ("`structural'" == "nostructural") {
local init_head: display _skip(0) "Initialization: "
display as text "`init_head'" _continue
display as result "`init'" _continue
local init_head: display _skip(0) "`init_head'" _col(49) ///
"Imputations" _col(69) "=" _skip(5) //string(e(M_mi))
display as text "`init_head'" _continue
display as result e(M_mi)
}
else {
if ("`rawsum'" == "") {
local gof: display _skip(0) "Weighting scheme: "
display as text "`gof'" _continue
display as result "`wscheme'" _col(49) _continue
}
else {
local gof: display _skip(0) "Weighting scheme: " _col(49)
display as text "`gof'" _continue
display as result "rawsum" _col(49) _continue
}
local gof: display _skip(0) _col(49) ///
"Imputations" _col(69) "=" _skip(5) //string(e(M_mi))
display as text "`gof'" _continue
display as result e(M_mi)
if ("`rawsum'" == "") {
local gof_rel: display _skip(0) "Tolerance: " //string(`tol', "%9.`digits'e")
display as text "`gof_rel'" _continue
display as result string(`tol', "%9.`digits'e") _col(49)
}
else {
local gof_rel: display _skip(0) _col(49)
display as text "`gof_rel'"
}
if ("`rawsum'" == "") {
local avred: display _skip(0) "Initialization: "
display as text "`avred'" _continue
display as result "`init'"
}
else {
local avred: display _skip(0)
display as text "`avred'"
}
}
end