File: type_dictionary.R

package info (click to toggle)
r-cran-marginaleffects 0.32.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,784 kB
  • sloc: sh: 13; makefile: 8
file content (200 lines) | stat: -rw-r--r-- 3,236 bytes parent folder | download
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
#' internal function to build the type dictionary
#'
#' @noRd
type_dictionary_build <- function() {
    text <-
        'class,type
bam,response
bam,link
bart,ev
bart,ppd
betareg,response
betareg,link
betareg,precision
betareg,quantile
betareg,variance
bife,response
bife,link
bracl,probs
brglmFit,response
brglmFit,link
brmsfit,response
brmsfit,link
brmsfit,prediction
brmsfit,average
brmultinom,probs
brmultinom,class
clm,prob
clm,cum.prob
clm,linear.predictor
clogit,expected
clogit,lp
clogit,risk
clogit,survival
coxph,survival
coxph,expected
coxph,lp
coxph,risk
coxph_weightit,survival
coxph_weightit,expected
coxph_weightit,lp
coxph_weightit,risk
crch,response
crch,location
crch,scale
crch,density
DirichletRegModel,response
hetprob,pr
hetprob,xb
hxlr,location
hxlr,cumprob
hxlr,scale
hxlr,density
ivpml,pr
ivpml,xb
flexsurvreg,survival,
flexsurvreg,response,
flexsurvreg,mean,
flexsurvreg,link,
flexsurvreg,lp,
flexsurvreg,linear,
flexsurvreg,rmst,
flexsurvreg,hazard,
flexsurvreg,cumhaz,
fixest,invlink(link)
fixest,response
fixest,link
hurdle,response
hurdle,prob
hurdle,count
hurdle,zero
iv_robust,response
gam,response
gam,link
Gam,invlink(link)
Gam,response
Gam,link
geeglm,response
geeglm,link
Gls,lp
glimML,response
glimML,link
glm,invlink(link)
glm,response
glm,link
glmerMod,response
glmerMod,link
glmgee,response
glmrob,response
glmrob,link
glmmTMB,response
glmmTMB,link
glmmTMB,conditional
glmmTMB,zprob
glmmTMB,zlink
glmmTMB,disp
glmmPQL,response
glmmPQL,link
glmx,response
glm_weightit,invlink(link)
glm_weightit,probs
glm_weightit,response
glm_weightit,lp
glm_weightit,link
ivreg,response
lda,class
lda,posterior
lm,response
lmerMod,response
lmerModLmerTest,response
lmrob,response
lm_robust,response
lrm,fitted
lrm,lp
lrm,mean
mblogit,response
mblogit,latent
mblogit,link
mclogit,response
mclogit,latent
mclogit,link
MCMCglmm,response
model_fit,numeric
model_fit,prob
model_fit,class
workflow,numeric
workflow,prob
workflow,class
multinom,probs
multinom,latent
multinom_weightit,probs
multinom_weightit,response
multinom_weightit,mean
mhurdle,E
mhurdle,Ep
mhurdle,p
mvgam,response
mvgam,link
mvgam,expected
mvgam,detection
mvgam,latent_N
negbin,invlink(link)
negbin,response
negbin,link
ols,lp
"oohbchoice", "probability",
"oohbchoice", "utility",
orm,fitted
orm,mean
orm,lp
ordinal_weightit,probs
ordinal_weightit,response
ordinal_weightit,link
ordinal_weightit,lp
ordinal_weightit,mean
polr,probs
rendo.base,response
rendo.base,link
rlm,response
selection,response
selection,link
selection,unconditional
selection,conditional
speedlm,response
speedglm,response
speedglm,link
stanreg,response
stanreg,link
survreg,response
survreg,link
survreg,quantile
svyglm,response
svyglm,link
svyolr,probs
tobit,response
tobit,link
tobit1,expvalue
tobit1,linpred
tobit1,prob
zeroinfl,response
zeroinfl,prob
zeroinfl,count
zeroinfl,zero'
    out <- utils::read.csv(
        text = text,
        colClasses = c("character", "character")
    )
    for (i in 1:2) {
        out[[i]] <- trimws(out[[i]])
    }
    return(out)
}


#' type dictionary
#'
#' insight::get_predict accepts a `predict` argument
#' stats::predict accepts a `type` argument
#' this dictionary converts
#' @noRd
type_dictionary <- type_dictionary_build()