-
Notifications
You must be signed in to change notification settings - Fork 27
/
loglinear.a.yaml
289 lines (262 loc) · 8.68 KB
/
loglinear.a.yaml
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
---
name: logLinear
title: Log-Linear Regression
menuGroup: Frequencies
menuSubgroup: ''
menuTitle: Log-Linear Regression
version: '1.0.0'
jas: '1.2'
description:
main: Log-Linear Regression
R:
dontrun: false
usage: |
data('mtcars')
tab <- table('gear'=mtcars$gear, 'cyl'=mtcars$cyl)
dat <- as.data.frame(tab)
logLinear(data = dat, factors = vars(gear, cyl), counts = Freq,
blocks = list(list("gear", "cyl", c("gear", "cyl"))),
refLevels = list(
list(var="gear", ref="3"),
list(var="cyl", ref="4")))
#
# LOG-LINEAR REGRESSION
#
# Model Fit Measures
# ───────────────────────────────────────
# Model Deviance AIC R²-McF
# ───────────────────────────────────────
# 1 4.12e-10 41.4 1.000
# ───────────────────────────────────────
#
#
# MODEL SPECIFIC RESULTS
#
# MODEL 1
#
# Model Coefficients
# ──────────────────────────────────────────────────────────────────
# Predictor Estimate SE Z p
# ──────────────────────────────────────────────────────────────────
# Intercept -4.71e-16 1.00 -4.71e-16 1.000
# gear:
# 4 – 3 2.079 1.06 1.961 0.050
# 5 – 3 0.693 1.22 0.566 0.571
# cyl:
# 6 – 4 0.693 1.22 0.566 0.571
# 8 – 4 2.485 1.04 2.387 0.017
# gear:cyl:
# (4 – 3):(6 – 4) -1.386 1.37 -1.012 0.311
# (5 – 3):(6 – 4) -1.386 1.73 -0.800 0.423
# (4 – 3):(8 – 4) -26.867 42247.17 -6.36e -4 0.999
# (5 – 3):(8 – 4) -2.485 1.44 -1.722 0.085
# ──────────────────────────────────────────────────────────────────
#
#
options:
- name: data
type: Data
description:
R: the data as a data frame
- name: factors
title: Factors
type: Variables
rejectUnusedLevels: true
suggested:
- nominal
permitted:
- factor
default:
description:
R: a vector of strings naming the factors from `data`
- name: counts
title: Counts (optional)
type: Variable
default:
permitted:
- numeric
description:
R: >
a string naming a variable in `data` containing counts, or NULL if
each row represents a single observation
- name: blocks
title: Blocks
type: Array
default: [[]]
template:
type: Terms
description:
R: >
a list containing vectors of strings that name the
predictors that are added to the model. The elements
are added to the model according to their order in the
list
- name: refLevels
title: Reference Levels
type: Array
items: (factors)
default:
template:
type: Group
elements:
- name: var
type: Variable
content: $key
- name: ref
type: Level
description:
R: >
a list of lists specifying reference levels of the dependent variable
and all the factors
- name: modelTest
title: Overall model test
type: Bool
default: false
description:
R: >
`TRUE` or `FALSE` (default), provide the model comparison between
the models and the NULL model
- name: dev
title: Deviance
type: Bool
default: true
description:
R: >
`TRUE` (default) or `FALSE`, provide the deviance (or -2LogLikelihood)
for the models
- name: aic
title: AIC
type: Bool
default: true
description:
R: >
`TRUE` (default) or `FALSE`, provide Aikaike's Information Criterion (AIC)
for the models
- name: bic
title: BIC
type: Bool
default: false
description:
R: >
`TRUE` or `FALSE` (default), provide Bayesian Information Criterion (BIC)
for the models
- name: pseudoR2
title: Pseudo R²
type: NMXList
options:
- name: r2mf
title: McFadden's R²
- name: r2cs
title: Cox & Snell's R²
- name: r2n
title: Nagelkerke's R²
default:
- r2mf
description:
R: >
one or more of `'r2mf'`, `'r2cs'`, or `'r2n'`;
use McFadden's, Cox & Snell, and Nagelkerke pseudo-R²,
respectively
- name: omni
title: Likelihood ratio tests
type: Bool
default: false
description:
R: >
`TRUE` or `FALSE` (default), provide the omnibus likelihood ratio tests
for the predictors
- name: ci
title: Confidence interval
type: Bool
default: false
description:
R: >
`TRUE` or `FALSE` (default), provide a confidence interval
for the model coefficient estimates
- name: ciWidth
title: Confidence level
type: Number
min: 50
max: 99.9
default: 95
description:
R: >
a number between 50 and 99.9 (default: 95) specifying the confidence
interval width
- name: RR
title: Rate ratio
type: Bool
default: false
description:
R: >
`TRUE` or `FALSE` (default), provide the exponential of the log-rate
ratio estimate, or the rate ratio estimate
- name: ciRR
title: Confidence interval
type: Bool
default: false
description:
R: >
`TRUE` or `FALSE` (default), provide a confidence interval
for the model coefficient rate ratio estimates
- name: ciWidthRR
title: Confidence level
type: Number
min: 50
max: 99.9
default: 95
description:
R: >
a number between 50 and 99.9 (default: 95) specifying the confidence
interval width
- name: emMeans
title: Marginal Means
type: Array
default: [[]]
template:
type: Variables
description:
R: >
a list of lists specifying the variables for which the estimated marginal
means need to be calculate. Supports up to three variables per term.
- name: ciEmm
title: Confidence interval
type: Bool
default: true
description:
R: >
`TRUE` (default) or `FALSE`, provide a confidence interval
for the estimated marginal means
- name: ciWidthEmm
title: Confidence level
type: Number
min: 50
max: 99.9
default: 95
description:
R: >
a number between 50 and 99.9 (default: 95) specifying the confidence
interval width for the estimated marginal means
- name: emmPlots
title: Marginal means plots
type: Bool
default: true
description:
R: >
`TRUE` (default) or `FALSE`, provide estimated marginal means plots
- name: emmTables
title: Marginal means tables
type: Bool
default: false
description:
R: >
`TRUE` or `FALSE` (default), provide estimated marginal means tables
- name: emmWeights
title: Equal cell weights
type: Bool
default: true
description:
R: >
`TRUE` (default) or `FALSE`, weigh each cell equally or weigh them according to
the cell frequency
...