-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpllf_examples_helpfile.log
More file actions
224 lines (185 loc) · 8.54 KB
/
pllf_examples_helpfile.log
File metadata and controls
224 lines (185 loc) · 8.54 KB
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
----------------------------------------------------------------------------------------------------
name: <unnamed>
log: c:\ian\git\pllf\pllf_examples_helpfile.log
log type: text
opened on: 1 Apr 2026, 19:26:32
.
. * Syntax 1
.
. * Input two-group data with event outcome
.
. clear
. input group pyears events
group pyears events
1. 0 200 38
2. 1 100 19
3. end
.
. * Fit Poisson model
.
. poisson events group, exposure(pyears)
Iteration 0: Log likelihood = -5.1354684
Iteration 1: Log likelihood = -5.1354681
Poisson regression Number of obs = 2
LR chi2(1) = -0.00
Prob > chi2 = 1.0000
Log likelihood = -5.1354681 Pseudo R2 = -0.0000
------------------------------------------------------------------------------
events | Coefficient Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
group | 1.10e-08 .2809757 0.00 1.000 -.5507023 .5507023
_cons | -1.660731 .1622214 -10.24 0.000 -1.978679 -1.342783
ln(pyears) | 1 (exposure)
------------------------------------------------------------------------------
.
. * Explore profile likelihood for the coefficient of group
.
. pllf, profile(group): poisson events group, exposure(pyears)
Profiling:..........................................................................................
> ..........
-------------------------------------------------------------
events | Coef. Std. Err. [95% PLL Conf. Int.]
-------------+-----------------------------------------------
group | 1.10e-08 .2828049 -.5712639 .5373108
-------------------------------------------------------------
Note: Std. Err. is pseudo standard error, derived from PLL CI
Graph command stored as F9
.
. * Load TRISST trial data (Joffe et al, 2022). The data
. * are from a non-inferiority trial of MRI vs CT for surveillance after testicular
. * cancer. The PLL CI does not cross zero while the Normal CI does. However this
. * is a non-inferiority trial with margin a risk difference of +0.057, so both CIs
. * clearly establish non-inferiority.
.
. use TRISST, clear
(NI trial of MRI vs CT after testicular cancer. Margin: RD = +0.057. Joffe 2022.)
. pllf, profile(modality) normal: binreg outcome modality [fw=n], rd
Note: using e(deviance)
Profiling:..........................................................................................
> ..........
-------------------------------------------------------------
outcome | Coef. Std. Err. [95% PLL Conf. Int.]
-------------+-----------------------------------------------
modality | -.0178926 .0099405 -.0390899 -.0001239
-------------------------------------------------------------
Note: Std. Err. is pseudo standard error, derived from PLL CI
* defining log likelihood = -0.5*e(deviance)
Graph command stored as F9
.
. * Load breast cancer data
.
. webuse brcancer, clear
(German breast cancer data)
. stset rectime, failure(censrec) scale(365.24)
Survival-time data settings
Failure event: censrec!=0 & censrec<.
Observed time interval: (0, rectime]
Exit on or before: failure
Time for analysis: time/365.24
--------------------------------------------------------------------------
686 total observations
0 exclusions
--------------------------------------------------------------------------
686 observations remaining, representing
299 failures in single-record/single-failure data
2,112.036 total analysis time at risk and under observation
At risk from t = 0
Earliest observed entry t = 0
Last observed exit t = 7.280145
.
. * Explore profile likelihood for coefficient of x5e
.
. pllf, profile(x5e) range(-3 -1): stcox x1 x4a x5e x6 hormon
Profiling:..........................................................................................
> ..........
-------------------------------------------------------------
_t | Coef. Std. Err. [95% PLL Conf. Int.]
-------------+-----------------------------------------------
x5e | -1.994528 .2259832 -2.435385 -1.549547
-------------------------------------------------------------
Note: Std. Err. is pseudo standard error, derived from PLL CI
Graph command stored as F9
.
. * Explore profile likelihood for coefficient of x1
.
. pllf, profile(x1) gen(X Y): stpm2 x1 x4a x5e x6 hormon, df(2) scale(hazard)
Profiling:..........................................................................................
> ..........
-------------------------------------------------------------
_d _t | Coef. Std. Err. [95% PLL Conf. Int.]
-------------+-----------------------------------------------
x1 | .0013215 .0060392 -.0105103 .013163
-------------------------------------------------------------
Note: Std. Err. is pseudo standard error, derived from PLL CI
Graph command stored as F9
.
. * Explore profile likelihood for the constant
.
. pllf, profile(_cons) n(50): streg x1 x4a x5e x6 hormon, distribution(weibull)
Profiling:..................................................
-------------------------------------------------------------
_t | Coef. Std. Err. [95% PLL Conf. Int.]
-------------+-----------------------------------------------
_cons | -1.536981 .4257861 -2.38719 -.7181392
-------------------------------------------------------------
Note: Std. Err. is pseudo standard error, derived from PLL CI
Graph command stored as F9
.
. * Explore profile likelihood for Weibull shape parameter
.
. pllf, profile([ln_p]_cons) n(50): streg x1 x4a x5e x6 hormon, distribution(weibull)
Profiling:..................................................
-------------------------------------------------------------
_t | Coef. Std. Err. [95% PLL Conf. Int.]
-------------+-----------------------------------------------
[ln_p] |
_cons | .3416282 .0483097 .2448839 .4342542
-------------------------------------------------------------
Note: Std. Err. is pseudo standard error, derived from PLL CI
Graph command stored as F9
.
. * Explore profile likelihood for predictor of Weibull shape parameter
.
. pllf, profile([ln_p]x4b) deviance difference n(20): streg x1 x4a x5e x6 hormon, distribution(weibu
> ll) ancillary(x4b)
Profiling:....................
-------------------------------------------------------------
_t | Coef. Std. Err. [95% PLL Conf. Int.]
-------------+-----------------------------------------------
[ln_p] |
x4b | -.0167018 .066479 -.1529494 .1076434
-------------------------------------------------------------
Note: Std. Err. is pseudo standard error, derived from PLL CI
Graph command stored as F9
.
. * Syntax 2
.
. * The following two commands are equivalent.
.
. pllf, formula(exp(-@*x5)) range(.05 .25): stcox x1 x4a x6 hormon
....................................................................................................
> ...
-------------------------------------------------------------
_t | Est. Std. Err. [95% PLL Conf. Int.]
-------------+-----------------------------------------------
Parameter @ | .1369005 .0471161 .0694188 .2541106
-------------------------------------------------------------
Note: Std. Err. is pseudo standard error, derived from PLL CI
Graph command stored as F9
. pllf, placeholder(X) formula(exp(-X*x5)) range(.05 .25): stcox x1 x4a x6 hormon
....................................................................................................
> ...
-------------------------------------------------------------
_t | Est. Std. Err. [95% PLL Conf. Int.]
-------------+-----------------------------------------------
Parameter X | .1369005 .0471161 .0694188 .2541106
-------------------------------------------------------------
Note: Std. Err. is pseudo standard error, derived from PLL CI
Graph command stored as F9
.
. log close
name: <unnamed>
log: c:\ian\git\pllf\pllf_examples_helpfile.log
log type: text
closed on: 1 Apr 2026, 19:27:16
----------------------------------------------------------------------------------------------------