├── .gitattributes ├── .gitignore ├── Bayesian-IRT.R ├── Bayesian-IRT.Rmd ├── Bayesian-IRT.Rproj ├── Bayesian-IRT.bib ├── Bayesian-IRT.pdf ├── Bayesian-IRT.tex ├── jss.bst ├── jss.cls └── jsslogo.jpg /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | .Ruserdata 5 | docs/ 6 | models/ 7 | archive/ 8 | submission/ 9 | *_cache/ 10 | *_files/ 11 | *.log 12 | -------------------------------------------------------------------------------- /Bayesian-IRT.R: -------------------------------------------------------------------------------- 1 | # This script requires brms version 2.11.5 or higher to fully run. 2 | 3 | # The current release version of brms can be installed via 4 | # install.packages("brms) 5 | 6 | # The current developmental version of brms can be installed via 7 | # remotes::install_github("paul-buerkner/brms") 8 | 9 | 10 | # load required packages 11 | library(tidyverse) 12 | library(brms) 13 | # for comparison with brms 14 | library(lme4) 15 | library(TAM) 16 | 17 | # set ggplot theme 18 | theme_set(bayesplot::theme_default()) 19 | 20 | # set rstan options 21 | rstan::rstan_options(auto_write = TRUE) 22 | options(mc.cores = 2) 23 | 24 | # create a "models" folder in the current working directory 25 | # to store fitted model objects for easier re-usage 26 | if (!dir.exists("models")) { 27 | dir.create("models") 28 | } 29 | 30 | # Although I set a seed for all models, the results are only exactly 31 | # reproducible on the same operating system with the same C++ compiler 32 | # and version. Thus, when you run the code below, it will not produce 33 | # exactly the same results as shown in the paper. 34 | 35 | # ----------- Code for Section 5.1 ------------ 36 | # Analysis of the VerbAgg data set using dichotomous IRT models 37 | data("VerbAgg", package = "lme4") 38 | 39 | # get an overview of the data 40 | head(VerbAgg, 10) 41 | 42 | # ---------- 1PL models ---------------------- 43 | # specify a 1PL model in brms 44 | formula_va_1pl <- bf(r2 ~ 1 + (1 | item) + (1 | id)) 45 | 46 | # specify some weakly informative priors 47 | prior_va_1pl <- 48 | prior("normal(0, 3)", class = "sd", group = "id") + 49 | prior("normal(0, 3)", class = "sd", group = "item") 50 | 51 | # fit the 1PL model 52 | fit_va_1pl <- brm( 53 | formula = formula_va_1pl, 54 | data = VerbAgg, 55 | family = brmsfamily("bernoulli", "logit"), 56 | prior = prior_va_1pl, 57 | seed = 1234, 58 | file = "models/fit_va_1pl" 59 | ) 60 | 61 | # obtain basic summaries 62 | summary(fit_va_1pl) 63 | plot(fit_va_1pl, ask = FALSE) 64 | 65 | # extract person parameters 66 | ranef_va_1pl <- ranef(fit_va_1pl) 67 | (person_pars_va_1pl <- ranef_va_1pl$id) 68 | 69 | # extract item parameters 70 | (item_pars_va_1pl <- coef(fit_va_1pl)$item) 71 | 72 | # plot item parameters 73 | item_pars_va_1pl[, , "Intercept"] %>% 74 | as_tibble() %>% 75 | rownames_to_column() %>% 76 | rename(item = "rowname") %>% 77 | mutate(item = as.numeric(item)) %>% 78 | ggplot(aes(item, Estimate, ymin = Q2.5, ymax = Q97.5)) + 79 | geom_pointrange() + 80 | coord_flip() + 81 | labs(x = "Item Number") 82 | 83 | # plot person parameters 84 | person_pars_va_1pl[, , "Intercept"] %>% 85 | as_tibble() %>% 86 | rownames_to_column() %>% 87 | arrange(Estimate) %>% 88 | mutate(id = seq_len(n())) %>% 89 | ggplot(aes(id, Estimate, ymin = Q2.5, ymax = Q97.5)) + 90 | geom_pointrange(alpha = 0.7) + 91 | coord_flip() + 92 | labs(x = "Person Number (Sorted)") 93 | 94 | # specify a 1PL model with lme4 for comparison 95 | lme4_va_1pl <- glmer( 96 | r2 ~ 1 + (1 | item) + (1 | id), 97 | data = VerbAgg, 98 | family = binomial() 99 | ) 100 | summary(lme4_va_1pl) 101 | 102 | # person and item parameters are similar to those obtained by brms 103 | coef(lme4_va_1pl)$item 104 | ranef(lme4_va_1pl)$id 105 | 106 | # specify a 1PL model with TAM for comparison 107 | # bring the data in wide structure first 108 | VerbAgg_wide <- VerbAgg %>% 109 | select(item, id, r2) %>% 110 | mutate(r2 = ifelse(r2 == "Y", 1, 0)) %>% 111 | spread(key = "item", value = "r2") %>% 112 | select(-id) 113 | 114 | # fit the model with TAM 115 | tam_va_1pl <- tam(VerbAgg_wide, irtmodel = "1PL", verbose = FALSE) 116 | 117 | # person and item parameters are similar to those obtained by brms 118 | summary(tam_va_1pl) 119 | IRT.factor.scores(tam_va_1pl) 120 | 121 | 122 | # ---------- 2PL models ---------------------- 123 | ## specify a 2PL model 124 | formula_va_2pl <- bf( 125 | r2 ~ exp(logalpha) * eta, 126 | eta ~ 1 + (1 |i| item) + (1 | id), 127 | logalpha ~ 1 + (1 |i| item), 128 | nl = TRUE 129 | ) 130 | 131 | # specify some weakly informative priors 132 | prior_va_2pl <- 133 | prior("normal(0, 5)", class = "b", nlpar = "eta") + 134 | prior("normal(0, 1)", class = "b", nlpar = "logalpha") + 135 | prior("constant(1)", class = "sd", group = "id", nlpar = "eta") + 136 | prior("normal(0, 3)", class = "sd", group = "item", nlpar = "eta") + 137 | prior("normal(0, 1)", class = "sd", group = "item", nlpar = "logalpha") 138 | 139 | # fit the 2PL model 140 | # this models throws some convergence warnings which are false 141 | # positives and can be safely ignored 142 | fit_va_2pl <- brm( 143 | formula = formula_va_2pl, 144 | data = VerbAgg, 145 | family = brmsfamily("bernoulli", "logit"), 146 | prior = prior_va_2pl, 147 | seed = 1234, 148 | file = "models/fit_va_2pl" 149 | ) 150 | 151 | # obtain some basic summaries 152 | summary(fit_va_2pl) 153 | plot(fit_va_2pl, ask = FALSE) 154 | 155 | # extract item parameters 156 | (item_pars_va_2pl <- coef(fit_va_2pl)$item) 157 | 158 | # plot item parameters 159 | # difficulties 160 | eta <- item_pars_va_1pl[, , "eta_Intercept"] %>% 161 | as_tibble() %>% 162 | rownames_to_column() 163 | 164 | # discriminations 165 | alpha <- item_pars_va_1pl[, , "logalpha_Intercept"] %>% 166 | exp() %>% 167 | as_tibble() %>% 168 | rownames_to_column() 169 | 170 | # plot difficulties and discrimination next to each other 171 | bind_rows(eta, alpha, .id = "nlpar") %>% 172 | rename(item = "rowname") %>% 173 | mutate(item = as.numeric(item)) %>% 174 | mutate(nlpar = factor(nlpar, labels = c("Easiness", "Discrimination"))) %>% 175 | ggplot(aes(item, Estimate, ymin = Q2.5, ymax = Q97.5)) + 176 | facet_wrap("nlpar", scales = "free_x") + 177 | geom_pointrange() + 178 | coord_flip() + 179 | labs(x = "Item Number") 180 | 181 | # extract person parameters 182 | ranef_va_2pl <- ranef(fit_va_2pl) 183 | (person_pars_va_2pl <- ranef_va_2pl$id) 184 | 185 | # plot person parameters 186 | person_pars_va_2pl[, , "eta_Intercept"] %>% 187 | as_tibble() %>% 188 | rownames_to_column() %>% 189 | select(-Est.Error) %>% 190 | arrange(Estimate) %>% 191 | mutate(id = seq_len(n())) %>% 192 | ggplot(aes(id, Estimate, ymin = Q2.5, ymax = Q97.5)) + 193 | geom_pointrange(alpha = 0.7) + 194 | coord_flip() + 195 | labs(x = "Person Number (Sorted)") 196 | 197 | # perform model comparison via approximate LOO-CV 198 | loo_va_1pl <- loo(fit_va_1pl) 199 | loo_va_2pl <- loo(fit_va_2pl) 200 | loo_va_compare <- loo_compare(loo_va_1pl, loo_va_2pl) 201 | print(loo_va_compare, simplify = FALSE) 202 | 203 | 204 | # ---------- 1PL models with covariates ---------------------- 205 | # specify a model including item covariates 206 | formula_va_1pl_cov1 <- bf( 207 | r2 ~ btype + situ + mode + (1 | item) + (0 + mode | id) 208 | ) 209 | 210 | fit_va_1pl_cov1 <- brm( 211 | formula = formula_va_1pl_cov1, 212 | data = VerbAgg, 213 | family = brmsfamily("bernoulli", "logit"), 214 | prior = prior_va_1pl, 215 | seed = 1234, 216 | file = "models/fit_va_1pl_cov1" 217 | ) 218 | 219 | summary(fit_va_1pl_cov1) 220 | conditional_effects(fit_va_1pl_cov1, "mode") 221 | 222 | # compare standard deviations 223 | hyp <- "modedo - modewant > 0" 224 | hypothesis(fit_va_1pl_cov1, hyp, class = "sd", group = "id") 225 | 226 | # fit a more complex covariate model 227 | formula_va_1pl_cov2 <- bf( 228 | r2 ~ Anger + Gender + btype + situ + mode + mode:Gender + 229 | (0 + Gender | item) + (0 + mode | id) 230 | ) 231 | fit_va_1pl_cov2 <- brm( 232 | formula = formula_va_1pl_cov2, 233 | data = VerbAgg, 234 | family = brmsfamily("bernoulli", "logit"), 235 | prior = prior_va_1pl, 236 | seed = 1234, 237 | file = "models/fit_va_1pl_cov2" 238 | ) 239 | 240 | summary(fit_va_1pl_cov2) 241 | plot(conditional_effects(fit_va_1pl_cov2, c("Anger", "mode:Gender")), ask = FALSE) 242 | 243 | 244 | # perform explicit DIF analysis 245 | # compute the DIF covariate 246 | VerbAgg$dif <- as.numeric(with( 247 | VerbAgg, Gender == "F" & mode == "do" & btype %in% c("curse", "scold") 248 | )) 249 | 250 | # fit and summarize the DIF model 251 | formula_va_1pl_dif1 <- bf( 252 | r2 ~ Gender + dif + (1 | item) + (1 | id) 253 | ) 254 | fit_va_1pl_dif1 <- brm( 255 | formula = formula_va_1pl_dif1, 256 | data = VerbAgg, 257 | family = brmsfamily("bernoulli", "logit"), 258 | prior = prior_va_1pl, 259 | seed = 1234, 260 | file = "models/fit_va_1pl_dif1" 261 | ) 262 | summary(fit_va_1pl_dif1) 263 | 264 | 265 | # compare convergence of lme4 and brms for a complex covariate model 266 | # does not converge well 267 | glmer_va_1pl_cov_full <- lme4::glmer( 268 | r2 ~ 1 + Anger + Gender + btype + situ + mode + 269 | (1 + Anger + Gender | item) + (1 + btype + situ + mode | id), 270 | data = VerbAgg, family = binomial("logit") 271 | ) 272 | summary(glmer_va_1pl_cov_full) 273 | 274 | # converges nicely and shows sensible results 275 | fit_va_1pl_cov_full <- brm( 276 | r2 ~ 1 + Anger + Gender + btype + situ + mode + 277 | (1 + Anger + Gender | item) + (1 + btype + situ + mode | id), 278 | data = VerbAgg, 279 | family = brmsfamily("bernoulli", "logit"), 280 | prior = prior_va_1pl, 281 | seed = 1234, 282 | file = "models/fit_va_1pl_cov_full" 283 | ) 284 | summary(fit_va_1pl_cov_full) 285 | 286 | 287 | # ---------- 3PL models ---------------------- 288 | # 3PL model with known guessing parameter 289 | formula_va_3pl <- bf( 290 | r2 ~ 0.25 + 0.75 * inv_logit(exp(logalpha) * eta), 291 | eta ~ 1 + (1 |i| item) + (1 | id), 292 | logalpha ~ 1 + (1 |i| item), 293 | nl = TRUE 294 | ) 295 | family_va_3pl <- brmsfamily("bernoulli", link = "identity") 296 | 297 | # 3PL model with unknown guessing parameters 298 | formula_va_3pl <- bf( 299 | r2 ~ gamma + (1 - gamma) * inv_logit(exp(logalpha) * eta), 300 | eta ~ 1 + (1 |i| item) + (1 | id), 301 | logalpha ~ 1 + (1 |i| item), 302 | logitgamma ~ 1 + (1 |i| item), 303 | nlf(gamma ~ inv_logit(logitgamma)), 304 | nl = TRUE 305 | ) 306 | 307 | 308 | 309 | # ----------- Code for Section 5.2 ------------ 310 | # fit ordinal models to the VerbAgg data 311 | 312 | # specify a basic GRM 313 | # this models throws some convergence warnings which are false 314 | # positives and can be safely ignored 315 | formula_va_ord_1pl <- bf(resp ~ 1 + (1 | item) + (1 | id)) 316 | fit_va_ord_1pl <- brm( 317 | formula = formula_va_ord_1pl, 318 | data = VerbAgg, 319 | family = brmsfamily("cumulative", "logit"), 320 | prior = prior_va_1pl, 321 | seed = 1234, 322 | file = "models/fit_va_ord_1pl" 323 | ) 324 | 325 | summary(fit_va_ord_1pl) 326 | plot(fit_va_ord_1pl, ask = FALSE) 327 | 328 | # extract item and person parameters 329 | (ranef_va_ord_1pl <- ranef(fit_va_ord_1pl)) 330 | 331 | # plot person parameters 332 | ranef_va_ord_1pl$id[, , "Intercept"] %>% 333 | as_tibble() %>% 334 | rownames_to_column() %>% 335 | arrange(Estimate) %>% 336 | mutate(id = seq_len(n())) %>% 337 | ggplot(aes(id, Estimate, ymin = Q2.5, ymax = Q97.5)) + 338 | geom_pointrange(alpha = 0.7) + 339 | coord_flip() + 340 | labs(x = "Person Number (Sorted)") 341 | 342 | 343 | # -------------- ordinal 1PL models with varying thresholds ---------- 344 | # specify a GRM with varying thresholds across items 345 | formula_va_ord_thres_1pl <- bf(resp | thres(gr = item) ~ 1 + (1 | id)) 346 | prior_va_ord_thres_1pl <- 347 | prior("normal(0, 3)", class = "Intercept") + 348 | prior("normal(0, 3)", class = "sd", group = "id") 349 | 350 | # this models throws some convergence warnings which are false 351 | # positives and can be safely ignored 352 | fit_va_ord_thres_1pl <- brm( 353 | formula = formula_va_ord_thres_1pl, 354 | data = VerbAgg, 355 | family = brmsfamily("cumulative", "logit"), 356 | prior = prior_va_ord_thres_1pl, 357 | inits = 0, chains = 2, 358 | seed = 1234, 359 | file = "models/fit_va_ord_thres_1pl" 360 | ) 361 | summary(fit_va_ord_thres_1pl) 362 | 363 | # perform model comparison 364 | loo(fit_va_ord_1pl, fit_va_ord_thres_1pl) 365 | 366 | 367 | # -------------- ordinal 2PL models --------------- 368 | # specify a GRM with varying discriminations 369 | formula_va_ord_2pl <- bf( 370 | resp ~ 1 + (1 |i| item) + (1 | id), 371 | disc ~ 1 + (1 |i| item) 372 | ) 373 | 374 | # some weakly informative priors 375 | prior_va_ord_2pl <- 376 | prior("constant(1)", class = "sd", group = "id") + 377 | prior("normal(0, 3)", class = "sd", group = "item") + 378 | prior("normal(0, 1)", class = "sd", group = "item", dpar = "disc") 379 | 380 | # fit the model 381 | # this models throws some convergence warnings which are false 382 | # positives and can be safely ignored 383 | fit_va_ord_2pl <- brm( 384 | formula = formula_va_ord_2pl, 385 | data = VerbAgg, 386 | family = brmsfamily("cumulative", "logit"), 387 | prior = prior_va_ord_2pl, 388 | seed = 1234, 389 | file = "models/fit_va_ord_2pl" 390 | ) 391 | summary(fit_va_ord_2pl) 392 | 393 | # extract item and person parameters 394 | (ranef_va_ord_2pl <- ranef(fit_va_ord_2pl)) 395 | 396 | # plot person parameters 397 | # item easinesses (deviations from thresholds) 398 | eta <- ranef_va_ord_2pl$item[, , "Intercept"] %>% 399 | as_tibble() %>% 400 | rownames_to_column() 401 | 402 | # discriminations 403 | alpha <- ranef_va_ord_2pl$item[, , "disc_Intercept"] %>% 404 | exp() %>% 405 | as_tibble() %>% 406 | rownames_to_column() 407 | 408 | # put easinesses and discriminations together 409 | bind_rows(eta, alpha, .id = "nlpar") %>% 410 | rename(item = "rowname") %>% 411 | mutate(item = as.numeric(item)) %>% 412 | mutate(nlpar = factor(nlpar, labels = c("Easiness", "Discrimination"))) %>% 413 | ggplot(aes(item, Estimate, ymin = Q2.5, ymax = Q97.5)) + 414 | facet_wrap("nlpar", scales = "free_x") + 415 | geom_pointrange() + 416 | coord_flip() + 417 | labs(x = "Item Number") 418 | 419 | # compute correlations between person parameters across models 420 | cbind( 421 | va_1pl = ranef_va_1pl$id[, "Estimate", "Intercept"], 422 | va_2pl = ranef_va_2pl$id[, "Estimate", "eta_Intercept"], 423 | va_ord_1pl = ranef_va_ord_1pl$id[, "Estimate", "Intercept"], 424 | va_ord_2pl = ranef_va_ord_2pl$id[, "Estimate", "Intercept"] 425 | ) %>% 426 | cor() %>% 427 | round(3) 428 | 429 | 430 | # ------- ordinal models with covariates ------------------- 431 | # fit a GRM with person and item covariates 432 | # this models throws some convergence warnings which are false 433 | # positives and can be safely ignored 434 | formula_va_ord_cov1 <- bf( 435 | resp ~ Anger + Gender + btype + situ + mode + mode:Gender + 436 | (0 + Gender | item) + (0 + mode | id) 437 | ) 438 | fit_va_ord_cov1 <- brm( 439 | formula = formula_va_ord_cov1, 440 | data = VerbAgg, 441 | family = brmsfamily("cumulative", "logit"), 442 | prior = prior_va_1pl, 443 | seed = 1234, 444 | file = "models/fit_va_ord_cov1" 445 | ) 446 | summary(fit_va_ord_cov1) 447 | 448 | # plot effects of Anger 449 | conditional_effects(fit_va_ord_cov1, effects = "Anger", categorical = TRUE) 450 | 451 | 452 | # fit a PCM with covariates and a category specific effect of 'Anger' 453 | formula_va_ord_cov2 <- bf( 454 | resp ~ cs(Anger) + Gender + btype + situ + mode + mode:Gender + 455 | (0 + Gender | item) + (0 + mode | id) 456 | ) 457 | 458 | # fit the model 459 | fit_va_ord_cov2 <- brm( 460 | formula = formula_va_ord_cov2, 461 | data = VerbAgg, 462 | family = brmsfamily("acat", "logit"), 463 | prior = prior_va_1pl, 464 | seed = 1234, 465 | file = "models/fit_va_ord_cov2" 466 | ) 467 | 468 | # summarize the results 469 | summary(fit_va_ord_cov2) 470 | conditional_effects(fit_va_ord_cov2, effects = "Anger", categorical = TRUE) 471 | 472 | 473 | 474 | 475 | # ----------- Code for Section 5.2 ------------ 476 | # Analysis of the rotation data set using response times IRT models 477 | data("rotation", package = "diffIRT") 478 | rotation <- rotation %>% 479 | as_tibble() %>% 480 | mutate(person = seq_len(n())) %>% 481 | gather("key", "value", -person) %>% 482 | extract("key", into = c("type", "item"), regex = "(.)\\[(.+)\\]") %>% 483 | spread("type", "value") %>% 484 | rename(time = T, resp = X) %>% 485 | mutate( 486 | rotate = factor(case_when( 487 | item %in% c(2, 5, 8) ~ 50, 488 | item %in% c(3, 6, 10) ~ 100, 489 | item %in% c(1, 4, 7, 9) ~ 150 490 | )), 491 | item = as.numeric(item) 492 | ) 493 | 494 | # get an overview of the data 495 | head(rotation, 10) 496 | 497 | 498 | # specify a distributional exgaussian model 499 | bform_exg1 <- bf( 500 | time ~ rotate + (1 |p| person) + (1 |i| item), 501 | sigma ~ rotate + (1 |p| person) + (1 |i| item), 502 | beta ~ rotate + (1 |p| person) + (1 |i| item) 503 | ) 504 | 505 | # fit the model 506 | fit_exg1 <- brm( 507 | bform_exg1, data = rotation, 508 | family = brmsfamily("exgaussian", link_sigma = "log", link_beta = "log"), 509 | chains = 4, cores = 4, inits = 0, 510 | control = list(adapt_delta = 0.99), 511 | seed = 1234, 512 | file = "models/fit_exg1" 513 | ) 514 | 515 | # summarize the results 516 | summary(fit_exg1) 517 | pp_check(fit_exg1) 518 | 519 | # visualize effects of 'rotate' 520 | conditional_effects(fit_exg1, "rotate", dpar = "mu") 521 | conditional_effects(fit_exg1, "rotate", dpar = "sigma") 522 | conditional_effects(fit_exg1, "rotate", dpar = "beta") 523 | 524 | 525 | 526 | # specify a 3-parameter drift diffusion model 527 | bform_drift1 <- bf( 528 | time | dec(resp) ~ rotate + (1 |p| person) + (1 |i| item), 529 | bs ~ rotate + (1 |p| person) + (1 |i| item), 530 | ndt ~ rotate + (1 |p| person) + (1 |i| item), 531 | bias = 0.5 532 | ) 533 | 534 | # specify initial values to help the model start sampling 535 | # diffusion models require quite a bit of working memory 536 | # and running multiple chains in parallel may exceed memory 537 | # capacity of some standard laptops 538 | # for this reason, we run only a single chain here but, 539 | # in practice, running multiple chains is recommended for 540 | # increased estimation accuracy and better convergence diagnostics 541 | chains <- 1 542 | inits_drift <- list(Intercept_ndt = -3) 543 | inits_drift <- replicate(chains, inits_drift, simplify = FALSE) 544 | 545 | # fit the model 546 | fit_drift1 <- brm( 547 | bform_drift1, data = rotation, 548 | family = brmsfamily("wiener", "log", link_bs = "log", link_ndt = "log"), 549 | chains = chains, cores = chains, 550 | inits = inits_drift, init_r = 0.05, 551 | control = list(adapt_delta = 0.99), 552 | seed = 1234, 553 | file = "models/fit_drift1" 554 | ) 555 | 556 | # summarize the model 557 | summary(fit_drift1) 558 | 559 | # extract item specific parameters 560 | coef(fit_drift1)$item 561 | 562 | # plot the effect of 'rotate' 563 | conditional_effects(fit_drift1, "rotate", dpar = "mu") 564 | conditional_effects(fit_drift1, "rotate", dpar = "bs") 565 | conditional_effects(fit_drift1, "rotate", dpar = "ndt") 566 | 567 | 568 | # specify a drift diffusion model without 569 | # 'rotate' affecting the boundary separation 570 | bform_drift2 <- bf( 571 | time | dec(resp) ~ rotate + (1 |p| person) + (1 |i| item), 572 | bs ~ 1 + (1 |p| person), 573 | ndt ~ rotate + (1 |p| person) + (1 |i| item), 574 | bias = 0.5 575 | ) 576 | 577 | # fit the model 578 | fit_drift2 <- brm( 579 | bform_drift2, rotation, 580 | family = wiener("log", link_bs = "log", link_ndt = "log"), 581 | chains = chains, cores = chains, 582 | inits = inits_drift, init_r = 0.05, 583 | control = list(adapt_delta = 0.99), 584 | seed = 1234, 585 | file = "models/fit_drift2" 586 | ) 587 | 588 | # perform model comparison via approximate LOO-CV 589 | loo_drift1 <- loo(fit_drift1) 590 | loo_drift2 <- loo(fit_drift2) 591 | loo_drift_compare <- loo_compare(loo_drift1, loo_drift2) 592 | print(loo_drift_compare, simplify = FALSE) 593 | -------------------------------------------------------------------------------- /Bayesian-IRT.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: No 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | -------------------------------------------------------------------------------- /Bayesian-IRT.bib: -------------------------------------------------------------------------------- 1 | % Encoding: UTF-8 2 | @Article{vehtari2017loo, 3 | author = {Vehtari, Aki and Gelman, Andrew and Gabry, Jonah}, 4 | title = {Practical {Bayesian} Model Evaluation Using Leave-One-Out Cross-Validation and {WAIC}}, 5 | journal = {Statistics and Computing}, 6 | year = {2017}, 7 | volume = {27}, 8 | number = {5}, 9 | pages = {1413--1432}, 10 | publisher = {Springer}, 11 | doi = {10.1007/s11222-016-9696-4} 12 | } 13 | 14 | @article{millsap1993, 15 | title={Methodology review: Statistical approaches for assessing measurement bias}, 16 | author={Millsap, Roger E and Everson, Howard T}, 17 | journal={Applied psychological Measurement}, 18 | volume={17}, 19 | number={4}, 20 | pages={297--334}, 21 | year={1993}, 22 | publisher={Sage}, 23 | doi = {10.1177/014662169301700401} 24 | } 25 | 26 | @book{gierl2012, 27 | title={Automatic item generation: Theory and practice}, 28 | author={Gierl, Mark J and Haladyna, Thomas M}, 29 | year={2012}, 30 | publisher={Routledge} 31 | } 32 | 33 | 34 | @article{paulewicz2020, 35 | title={The \pkg{bhsdtr} package: a general-purpose method of {B}ayesian inference for Signal Detection Theory models}, 36 | author={Paulewicz, Borys{\l}aw and Blaut, Agata}, 37 | year={2020}, 38 | journal={Behavior Research Methods} 39 | } 40 | 41 | @book{osterlind2009, 42 | title={Differential item functioning}, 43 | author={Osterlind, Steven J and Everson, Howard T}, 44 | volume={161}, 45 | year={2009}, 46 | publisher={Sage} 47 | } 48 | 49 | @book{holland1993, 50 | title={Differential item functioning}, 51 | author={Holland, Paul W and Wainer, Howard}, 52 | year={1993}, 53 | publisher={Routledge} 54 | } 55 | 56 | 57 | 58 | @article{borst2011, 59 | title={Mental rotation is not easily cognitively penetrable}, 60 | author={Borst, Gr{\'e}goire and Kievit, Rogier A and Thompson, William L and Kosslyn, Stephen M}, 61 | journal={Journal of Cognitive Psychology}, 62 | volume={23}, 63 | number={1}, 64 | pages={60--75}, 65 | year={2011}, 66 | publisher={Taylor \& Francis}, 67 | doi = {10.1080/20445911.2011.454498} 68 | } 69 | 70 | 71 | @book{wickham2016, 72 | title={{R} for data science: import, tidy, transform, visualize, and model data}, 73 | author={Wickham, Hadley and Grolemund, Garrett}, 74 | year={2016}, 75 | publisher={O'Reilly} 76 | } 77 | 78 | @article{sanmartin2015, 79 | title={Identification of item response theory models}, 80 | author={San Mart{\'i}n, Ernesto}, 81 | journal={Handbook of Item Response Theory: Models, Statistical Tools, and Applications}, 82 | volume={2}, 83 | year={2015} 84 | } 85 | 86 | @article{sanmartin2010, 87 | title={{B}ayesian identifiability: Contributions to an inconclusive debate}, 88 | author={San Mart{\'i}n, Ernesto and Gonz{\'a}lez, Jorge}, 89 | journal={Chilean Journal of Statistics}, 90 | volume={1}, 91 | number={2}, 92 | pages={69--91}, 93 | year={2010} 94 | } 95 | 96 | @article{bollen2009, 97 | title={Two rules of identification for structural equation models}, 98 | author={Bollen, Kenneth A and Davis, Walter R}, 99 | journal={Structural Equation Modeling: A Multidisciplinary Journal}, 100 | volume={16}, 101 | number={3}, 102 | pages={523--536}, 103 | year={2009}, 104 | publisher={Taylor \& Francis}, 105 | doi = {10.1080/10705510903008261} 106 | } 107 | 108 | @article{ratcliff1978, 109 | title={A theory of memory retrieval}, 110 | author={Ratcliff, Roger}, 111 | journal={Psychological Review}, 112 | volume={85}, 113 | number={2}, 114 | pages={59--108}, 115 | year={1978}, 116 | doi = {10.1037/0033-295X.85.2.59}, 117 | publisher={American Psychological Association} 118 | } 119 | 120 | @article{vandermaas2011, 121 | title={Cognitive psychology meets psychometric theory: On the relation between process models for decision making and latent variable models for individual differences.}, 122 | author={van der Maas, Han LJ and Molenaar, Dylan and Maris, Gunter and Kievit, Rogier A and Borsboom, Denny}, 123 | journal={Psychological Review}, 124 | volume={118}, 125 | number={2}, 126 | pages={339--356}, 127 | year={2011}, 128 | doi = {10.1037/a0022749}, 129 | publisher={American Psychological Association} 130 | } 131 | 132 | @article{tuerlinckx2005, 133 | title={Two interpretations of the discrimination parameter}, 134 | author={Tuerlinckx, Francis and De Boeck, Paul}, 135 | journal={Psychometrika}, 136 | volume={70}, 137 | number={4}, 138 | pages={629--650}, 139 | year={2005}, 140 | publisher={Springer}, 141 | doi = {10.1007/s11336-000-0810-3} 142 | } 143 | 144 | @Article{adams2012, 145 | author = {Adams, Raymond J and Wu, Margaret L and Wilson, Mark}, 146 | title = {The {R}asch rating model and the disordered threshold controversy}, 147 | journal = {Educational and Psychological Measurement}, 148 | year = {2012}, 149 | volume = {72}, 150 | number = {4}, 151 | pages = {547--573}, 152 | doi = {10.1177/0013164411432166}, 153 | owner = {Paul}, 154 | publisher = {Sage Publications}, 155 | timestamp = {2015.02.08}, 156 | } 157 | 158 | @article{shmueli2005, 159 | title={A useful distribution for fitting discrete data: revival of the Conway--Maxwell--Poisson distribution}, 160 | author={Shmueli, Galit and Minka, Thomas P and Kadane, Joseph B and Borle, Sharad and Boatwright, Peter}, 161 | journal={Journal of the Royal Statistical Society C (Applied Statistics)}, 162 | volume={54}, 163 | number={1}, 164 | pages={127--142}, 165 | year={2005}, 166 | doi = {10.1111/j.1467-9876.2005.00474.x}, 167 | publisher={John Wiley \& Sons} 168 | } 169 | 170 | 171 | @book{rasch1960, 172 | title={Studies in Mathematical Psychology: I. Probabilistic models for some intelligence and attainment tests.}, 173 | author={Rasch, Georg}, 174 | year={1960}, 175 | publisher={Nielsen \& Lydiche} 176 | } 177 | 178 | @article{brown2016, 179 | title={Thurstonian scaling of compositional questionnaire data}, 180 | author={Brown, Anna}, 181 | journal={Multivariate behavioral research}, 182 | volume={51}, 183 | number={2-3}, 184 | pages={345--356}, 185 | year={2016}, 186 | publisher={Taylor \& Francis} 187 | } 188 | 189 | @article{andrich2004, 190 | title={Controversy and the Rasch model: a characteristic of incompatible paradigms?}, 191 | author={Andrich, David}, 192 | journal={Medical Care}, 193 | volume = {42}, 194 | number = {1}, 195 | pages={17--116}, 196 | year={2004}, 197 | publisher={JSTOR} 198 | } 199 | 200 | 201 | @article{diffIRT, 202 | title={Fitting diffusion item response theory models for responses and response times using the R package diffIRT}, 203 | author={Molenaar, Dylan and Tuerlinckx, Francis and van der Maas, Han LJ and others}, 204 | journal={Journal of Statistical Software}, 205 | volume={66}, 206 | number={4}, 207 | pages={1--34}, 208 | year={2015}, 209 | publisher={Foundation for Open Access Statistics}, 210 | doi = {10.18637/jss.v066.i04} 211 | } 212 | 213 | @article{heathcote1991, 214 | title={Analysis of response time distributions: An example using the Stroop task.}, 215 | author={Heathcote, Andrew and Popiel, Stephen J and Mewhort, DJ}, 216 | journal={Psychological Bulletin}, 217 | volume={109}, 218 | number={2}, 219 | pages={340-347}, 220 | year={1991}, 221 | publisher={American Psychological Association}, 222 | doi = {10.1037/0033-2909.109.2.340} 223 | } 224 | 225 | @article{wagenmakers2007, 226 | title={On the linear relation between the mean and the standard deviation of a response time distribution.}, 227 | author={Wagenmakers, Eric-Jan and Brown, Scott}, 228 | journal={Psychological Review}, 229 | volume={114}, 230 | number={3}, 231 | pages={830--841}, 232 | year={2007}, 233 | publisher={American Psychological Association}, 234 | doi = {10.1037/0033-295X.114.3.830} 235 | } 236 | 237 | 238 | @Article{vehtari2017psis, 239 | author = {Vehtari, Aki and Gelman, Andrew and Gabry, Jonah}, 240 | title = {{P}areto smoothed importance sampling}, 241 | journal = {arXiv preprint}, 242 | year = {2017}, 243 | url = {https://arxiv.org/abs/1507.02646} 244 | } 245 | 246 | @Book{fahrmeir2013, 247 | title = {Regression: models, methods and applications}, 248 | publisher = {Springer}, 249 | year = {2013}, 250 | author = {Fahrmeir, Ludwig and Kneib, Thomas and Lang, Stefan and Marx, Brian}, 251 | } 252 | 253 | @Manual{gamlss.data, 254 | title = {gamlss.data: GAMLSS Data}, 255 | author = {Mikis Stasinopoulos and Bob Rigby}, 256 | year = {2016}, 257 | note = {R package version 5.0-0}, 258 | url = {https://CRAN.R-project.org/package=gamlss.data}, 259 | } 260 | 261 | @Article{wood2013, 262 | author = {Wood, Simon N and Scheipl, Fabian and Faraway, Julian J}, 263 | title = {Straightforward intermediate rank tensor product smoothing in mixed models}, 264 | journal = {Statistics and Computing}, 265 | year = {2013}, 266 | pages = {1--20}, 267 | publisher = {Springer}, 268 | } 269 | 270 | @Manual{mcelreath2017, 271 | title = {rethinking: Statistical Rethinking Course and Book Package}, 272 | author = {Richard McElreath}, 273 | year = {2017}, 274 | note = {R package version 1.59}, 275 | owner = {Paul}, 276 | timestamp = {2016.03.04}, 277 | url = {https://github.com/rmcelreath/rethinking}, 278 | } 279 | 280 | @book{lord2012, 281 | title={Applications of item response theory to practical testing problems}, 282 | author={Lord, Frederic M}, 283 | year={2012}, 284 | publisher={Routledge} 285 | } 286 | 287 | @book{embretson2013, 288 | title={Item response theory}, 289 | author={Embretson, Susan E and Reise, Steven P}, 290 | year={2013}, 291 | publisher={Psychology Press} 292 | } 293 | 294 | @book{vanderlinden1997, 295 | title={Handbook of modern item response theory}, 296 | author={van der Linden, Wim J and Hambleton, Ronald K}, 297 | year={1997}, 298 | publisher={Springer} 299 | } 300 | 301 | @Article{wagenmakers2010, 302 | author = {Wagenmakers, Eric-Jan and Lodewyckx, Tom and Kuriyal, Himanshu and Grasman, Raoul}, 303 | title = {Bayesian hypothesis testing for psychologists: A tutorial on the Savage--Dickey method}, 304 | journal = {Cognitive psychology}, 305 | year = {2010}, 306 | volume = {60}, 307 | number = {3}, 308 | pages = {158--189}, 309 | publisher = {Elsevier}, 310 | } 311 | 312 | @Manual{bridgesampling, 313 | title = {bridgesampling: Bridge Sampling for Marginal Likelihoods and Bayes Factors}, 314 | author = {Quentin F. Gronau and Henrik Singmann}, 315 | year = {2018}, 316 | note = {R package version 0.6-0}, 317 | url = {https://CRAN.R-project.org/package=bridgesampling}, 318 | } 319 | 320 | @BOOK{brown2015, 321 | title = {Applied Mixed Models in Medicine}, 322 | publisher = {John Wiley \& Sons}, 323 | year = {2015}, 324 | author = {Brown, Helen and Prescott, Robin}, 325 | owner = {Paul}, 326 | timestamp = {2015.06.19} 327 | } 328 | 329 | @Book{demidenko2013, 330 | title = {Mixed Models: Theory and Applications with R}, 331 | publisher = {John Wiley \& Sons}, 332 | year = {2013}, 333 | author = {Demidenko, Eugene}, 334 | owner = {Paul}, 335 | timestamp = {2015.06.19}, 336 | } 337 | 338 | @Book{gelmanMLM2006, 339 | title = {Data Analysis Using Regression and Multilevel/Hierarchical Models}, 340 | publisher = {Cambridge University Press}, 341 | year = {2006}, 342 | author = {Gelman, Andrew and Hill, Jennifer}, 343 | owner = {Paul}, 344 | timestamp = {2016.02.21}, 345 | } 346 | 347 | @Book{pinheiro2006, 348 | title = {Mixed-Effects Models in S and S-PLUS}, 349 | publisher = {Springer}, 350 | year = {2006}, 351 | author = {Pinheiro, Jose and Bates, Douglas}, 352 | owner = {Paul}, 353 | timestamp = {2015.06.19}, 354 | } 355 | 356 | @Article{rigby2005, 357 | author = {Rigby, Robert A and Stasinopoulos, D Mikis}, 358 | title = {Generalized Additive Models for Location, Scale and Shape}, 359 | journal = {Journal of the Royal Statistical Society C (Applied Statistics)}, 360 | year = {2005}, 361 | volume = {54}, 362 | number = {3}, 363 | pages = {507--554}, 364 | publisher = {John Wiley \& Sons}, 365 | doi = {10.1111/j.1467-9876.2005.00510.x} 366 | } 367 | 368 | @Article{lindstrom1990, 369 | author = {Lindstrom, Mary J and Bates, Douglas M}, 370 | title = {Nonlinear Mixed Effects Models for Repeated Measures Data}, 371 | journal = {Biometrics}, 372 | year = {1990}, 373 | pages = {673--687}, 374 | publisher = {JSTOR}, 375 | } 376 | 377 | @Article{wood2004, 378 | author = {Wood, Simon N}, 379 | title = {Stable and Efficient Multiple Smoothing Parameter Estimation for Generalized Additive Models}, 380 | journal = {Journal of the American Statistical Association}, 381 | year = {2004}, 382 | volume = {99}, 383 | number = {467}, 384 | pages = {673--686}, 385 | publisher = {Taylor \& Francis}, 386 | } 387 | 388 | @Article{rasmussen2006, 389 | author = {Rasmussen, Carl Edward and Williams, C. K. I.}, 390 | title = {Gaussian processes for machine learning}, 391 | year = {2006}, 392 | publisher = {Massachusetts Institute of Technology}, 393 | } 394 | 395 | @BOOK{hastie1990, 396 | title = {Generalized Additive Models}, 397 | publisher = {CRC Press}, 398 | year = {1990}, 399 | author = {Hastie, Trevor J and Tibshirani, Robert J}, 400 | volume = {43}, 401 | owner = {Paul}, 402 | timestamp = {2015.09.07} 403 | } 404 | 405 | @BOOK{gelman2013, 406 | title = {Bayesian Data Analysis (3rd Edition)}, 407 | publisher = {Chapman and Hall/CRC}, 408 | year = {2013}, 409 | author = {Gelman, Andrew and Carlin, John B and Stern, Hal S and Dunson, David B and Vehtari, Aki and Rubin, Donald 410 | B}, 411 | owner = {Paul}, 412 | doi = {10.1201/b16018}, 413 | timestamp = {2015.06.20} 414 | } 415 | 416 | @article{gelman1992, 417 | title={Inference from iterative simulation using multiple sequences (with discussion)}, 418 | author={Gelman, Andrew and Rubin, Donald B}, 419 | journal={Statistical Science}, 420 | volume={7}, 421 | number={4}, 422 | pages={457--511}, 423 | year={1992} 424 | } 425 | 426 | @article{vehtari2019, 427 | title={Rank-normalization, folding, and localization: An improved $\widehat{R}$ for assessing convergence of MCMC}, 428 | author={Vehtari, Aki and Gelman, Andrew and Simpson, Daniel and Carpenter, Bob and B{\"u}rkner, Paul-Christian}, 429 | journal={arXiv preprint}, 430 | url = {https://arxiv.org/abs/1903.08008}, 431 | year={2019} 432 | } 433 | 434 | @article{hijazi2009, 435 | title={Modelling compositional data using Dirichlet regression models}, 436 | author={Hijazi, Rafiq H and Jernigan, Robert W}, 437 | journal={Journal of Applied Probability \& Statistics}, 438 | volume={4}, 439 | number={1}, 440 | pages={77--91}, 441 | year={2009} 442 | } 443 | 444 | @article{schauberger2019, 445 | title={A regularization approach for the detection of differential item functioning in generalized partial credit models}, 446 | author={Schauberger, Gunther and Mair, Patrick}, 447 | journal={Behavior Research Methods}, 448 | pages={1--16}, 449 | year={2019}, 450 | publisher={Springer}, 451 | doi = {10.3758/s13428-019-01224-2} 452 | } 453 | 454 | @article{piironen2017comparison, 455 | title={Comparison of Bayesian predictive methods for model selection}, 456 | author={Piironen, Juho and Vehtari, Aki}, 457 | journal={Statistics and Computing}, 458 | volume={27}, 459 | number={3}, 460 | pages={711--735}, 461 | year={2017}, 462 | publisher={Springer}, 463 | doi = {10.1007/s11222-016-9649-y} 464 | } 465 | 466 | 467 | @Manual{stanM2019, 468 | title = {{S}tan Modeling Language: User's Guide and Reference Manual}, 469 | author = {{Stan Development Team}}, 470 | year = {2019}, 471 | owner = {Paul}, 472 | timestamp = {2015.06.18}, 473 | url = {http://mc-stan.org/manual.html}, 474 | } 475 | 476 | @ARTICLE{lewandowski2009, 477 | author = {Lewandowski, Daniel and Kurowicka, Dorota and Joe, Harry}, 478 | title = {Generating Random Correlation Matrices Based on Vines and Extended 479 | Onion Method}, 480 | journal = {Journal of Multivariate Analysis}, 481 | year = {2009}, 482 | volume = {100}, 483 | pages = {1989--2001}, 484 | number = {9}, 485 | owner = {Paul}, 486 | publisher = {Elsevier}, 487 | timestamp = {2015.07.23}, 488 | doi = {10.1016/j.jmva.2009.04.008} 489 | } 490 | 491 | @article{gabry2019, 492 | title={Visualization in {B}ayesian workflow}, 493 | author={Gabry, Jonah and Simpson, Daniel and Vehtari, Aki and Betancourt, Michael and Gelman, Andrew}, 494 | journal={Journal of the Royal Statistical Society A (Statistics in Society)}, 495 | volume={182}, 496 | number={2}, 497 | pages={389--402}, 498 | year={2019}, 499 | publisher={John Wiley \& Sons}, 500 | doi = {10.1111/rssa.12378} 501 | } 502 | 503 | @ARTICLE{creutz1988, 504 | author = {Creutz, Michael}, 505 | title = {Global Monte Carlo Algorithms for Many-Fermion Systems}, 506 | journal = {Physical Review D}, 507 | year = {1988}, 508 | volume = {38}, 509 | pages = {1228--1238}, 510 | number = {4}, 511 | owner = {Paul}, 512 | publisher = {APS}, 513 | timestamp = {2015.08.10}, 514 | doi = {10.1103/PhysRevD.38.1228} 515 | } 516 | 517 | @BOOK{griewank2008, 518 | title = {Evaluating Derivatives: Principles and Techniques of Algorithmic 519 | Differentiation}, 520 | publisher = {Siam}, 521 | year = {2008}, 522 | author = {Griewank, Andreas and Walther, Andrea}, 523 | owner = {Paul}, 524 | timestamp = {2015.08.10} 525 | } 526 | 527 | @article{meng1996, 528 | title={Simulating ratios of normalizing constants via a simple identity: a theoretical exploration}, 529 | author={Meng, Xiao-Li and Wong, Wing Hung}, 530 | journal={Statistica Sinica}, 531 | volume = {6}, 532 | number = {4}, 533 | pages={831--860}, 534 | year={1996}, 535 | publisher={JSTOR} 536 | } 537 | 538 | @article{meng2002, 539 | title={Warp bridge sampling}, 540 | author={Meng, Xiao-Li and Schilling, Stephen}, 541 | journal={Journal of Computational and Graphical Statistics}, 542 | volume={11}, 543 | number={3}, 544 | pages={552--586}, 545 | year={2002}, 546 | publisher={Taylor \& Francis}, 547 | doi = {10.1198/106186002457} 548 | } 549 | 550 | @Article{carpenter2017, 551 | author = {Carpenter, B. and Gelman, A. and Hoffman, M. and Lee, D. and Goodrich, B. and Betancourt, M. and Brubaker, M. A. and Guo, J. and Li, P. and Ridell, A.}, 552 | title = {Stan: A Probabilistic Programming Language}, 553 | journal = {Journal of Statistical Software}, 554 | year = {2017}, 555 | pages = {1--32}, 556 | volume = {76}, 557 | number = {1}, 558 | owner = {Paul}, 559 | timestamp = {2015.06.19}, 560 | doi = {10.18637/jss.v076.i01} 561 | } 562 | 563 | @ARTICLE{duane1987, 564 | author = {Duane, Simon and Kennedy, Anthony D and Pendleton, Brian J and Roweth, 565 | Duncan}, 566 | title = {Hybrid Monte Carlo}, 567 | journal = {Physics Letters B}, 568 | year = {1987}, 569 | volume = {195}, 570 | pages = {216--222}, 571 | number = {2}, 572 | owner = {Paul}, 573 | publisher = {Elsevier}, 574 | timestamp = {2015.06.19} 575 | } 576 | 577 | @InBook{neal2011, 578 | chapter = {MCMC Using Hamiltonian Dynamics}, 579 | title = {Handbook of Markov Chain Monte Carlo}, 580 | publisher = {CRC Press}, 581 | year = {2011}, 582 | author = {Neal, Radford M}, 583 | volume = {2}, 584 | owner = {Paul}, 585 | timestamp = {2015.06.19}, 586 | } 587 | 588 | @Article{betancourt2014, 589 | author = {Betancourt, MJ and Byrne, Simon and Livingstone, Samuel and Girolami, Mark}, 590 | title = {The Geometric Foundations of Hamiltonian Monte Carlo}, 591 | journal = {arXiv preprint}, 592 | year = {2014}, 593 | url = {https://arxiv.org/abs/1410.5110} 594 | } 595 | 596 | @ARTICLE{hoffman2014, 597 | author = {Hoffman, Matthew D and Gelman, Andrew}, 598 | title = {The No-U-Turn Sampler: Adaptively Setting Path Lengths in Hamiltonian 599 | Monte Carlo}, 600 | journal = {The Journal of Machine Learning Research}, 601 | year = {2014}, 602 | volume = {15}, 603 | pages = {1593--1623}, 604 | number = {1}, 605 | owner = {Paul}, 606 | publisher = {JMLR. org}, 607 | timestamp = {2015.06.19} 608 | } 609 | 610 | @Article{betancourt2017, 611 | author = {Michael Betancourt}, 612 | title = {A Conceptual Introduction to Hamiltonian Monte Carlo}, 613 | journal = {arXiv preprint}, 614 | year = {2017}, 615 | url = {https://arxiv.org/pdf/1701.02434.pdf}, 616 | } 617 | 618 | @ARTICLE{lme4, 619 | author = {Douglas Bates and Martin M{\"a}chler and Ben Bolker and Steve Walker}, 620 | title = {Fitting Linear Mixed-Effects Models Using \pkg{lme4}}, 621 | journal = {Journal of Statistical Software}, 622 | year = {2015}, 623 | volume = {67}, 624 | pages = {1--48}, 625 | number = {1}, 626 | owner = {Paul}, 627 | timestamp = {2015.11.13}, 628 | doi = {10.18637/jss.v067.i01} 629 | } 630 | 631 | @article{spielberger2010, 632 | title={State-Trait anger expression inventory}, 633 | author={Spielberger, Charles D}, 634 | journal={The Corsini Encyclopedia of Psychology}, 635 | year={2010}, 636 | publisher={John Wiley \& Sons} 637 | } 638 | 639 | @article{barr2013, 640 | title={Random effects structure for confirmatory hypothesis testing: Keep it maximal}, 641 | author={Barr, Dale J and Levy, Roger and Scheepers, Christoph and Tily, Harry J}, 642 | journal={Journal of memory and language}, 643 | volume={68}, 644 | number={3}, 645 | pages={255--278}, 646 | year={2013}, 647 | publisher={Elsevier}, 648 | doi = {10.1016/j.jml.2012.11.001} 649 | } 650 | 651 | @article{bates2015, 652 | title={Parsimonious mixed models}, 653 | author={Bates, Douglas and Kliegl, Reinhold and Vasishth, Shravan and Baayen, Harald}, 654 | journal={arXiv preprint}, 655 | year={2015}, 656 | url = {https://arxiv.org/abs/1506.04967} 657 | } 658 | 659 | 660 | 661 | @Article{lavaan, 662 | title = {{lavaan}: An {R} Package for Structural Equation Modeling}, 663 | author = {Yves Rosseel}, 664 | journal = {Journal of Statistical Software}, 665 | year = {2012}, 666 | volume = {48}, 667 | number = {2}, 668 | pages = {1--36}, 669 | doi = {10.18637/jss.v048.i02} 670 | } 671 | 672 | @Article{MCMCglmm, 673 | author = {Hadfield, Jarrod D}, 674 | title = {{MCMC} Methods for Multi-Response Generalized Linear Mixed Models: the \pkg{MCMCglmm} \proglang{R} Package}, 675 | journal = {Journal of Statistical Software}, 676 | year = {2010}, 677 | volume = {33}, 678 | number = {2}, 679 | pages = {1--22}, 680 | owner = {Paul}, 681 | timestamp = {2015.06.18}, 682 | doi = {10.18637/jss.v033.i02} 683 | } 684 | 685 | @article{buerkner2020spm, 686 | title={Analysing Standard Progressive Matrics ({SPM-LS}) with {B}ayesian Item Response Models}, 687 | author={B{\"u}rkner, Paul-Christian}, 688 | year={2020}, 689 | journal={Journal of Intelligence}, 690 | pages={1--21} 691 | } 692 | 693 | @article{buerkner2019, 694 | title={Ordinal Regression Models in Psychology: A Tutorial}, 695 | author={B{\"u}rkner, Paul-Christian and Vuorre, Matti}, 696 | journal={Advances in Methods and Practices in Psychological Science}, 697 | pages={77--101}, 698 | year={2019}, 699 | volume = {2}, 700 | number = {1}, 701 | publisher={SAGE Publications Sage CA: Los Angeles, CA}, 702 | url = {10.1177/2515245918823199} 703 | } 704 | 705 | @INPROCEEDINGS{rasch1961, 706 | author = {Rasch, Georg}, 707 | title = {On general laws and the meaning of measurement in psychology}, 708 | booktitle = {Proceedings of the fourth Berkeley symposium on mathematical statistics 709 | and probability}, 710 | year = {1961}, 711 | volume = {4}, 712 | pages = {321--333}, 713 | organization = {University of California Press Berkeley, CA}, 714 | owner = {Paul}, 715 | timestamp = {2015.02.08} 716 | } 717 | 718 | @INCOLLECTION{samejima1997, 719 | author = {Samejima, Fumiko}, 720 | title = {Graded Response Model}, 721 | booktitle = {Handbook of Modern Item Response Theory}, 722 | publisher = {Springer}, 723 | year = {1997}, 724 | pages = {85--100}, 725 | owner = {Paul}, 726 | timestamp = {2015.01.27} 727 | } 728 | 729 | @Article{oecd2017, 730 | author = {OECD}, 731 | title = {{PISA} 2015: {T}echnical Report}, 732 | year = {2017}, 733 | url = {http://www.oecd.org/pisa/data/2015-technical-report/}, 734 | } 735 | 736 | @article{eRm, 737 | title={Extended Rasch modeling: The eRm package for the application of IRT models in R}, 738 | author={Mair, Patrick and Hatzinger, Reinhold}, 739 | journal={Journal of Statistical Software}, 740 | volume={20}, 741 | number={9}, 742 | pages={1--20}, 743 | year={2007}, 744 | publisher={Foundation for Open Access Statistics}, 745 | doi = {10.18637/jss.v020.i09} 746 | } 747 | 748 | @Article{ltm, 749 | title = {ltm: An R package for Latent Variable Modelling and Item Response Theory Analyses}, 750 | author = {Dimitris Rizopoulos}, 751 | journal = {Journal of Statistical Software}, 752 | year = {2006}, 753 | volume = {17}, 754 | number = {5}, 755 | pages = {1--25}, 756 | doi = {10.18637/jss.v017.i05} 757 | } 758 | 759 | @Manual{TAM, 760 | title = {TAM: Test analysis modules}, 761 | author = {Alexander Robitzsch and Thomas Kiefer and Margaret Wu}, 762 | year = {2019}, 763 | note = {R package version 3.1-45}, 764 | url = {https://CRAN.R-project.org/package=TAM}, 765 | } 766 | 767 | @Article{mirt, 768 | title = {{mirt}: A Multidimensional Item Response Theory Package for the {R} Environment}, 769 | author = {R. Philip Chalmers}, 770 | journal = {Journal of Statistical Software}, 771 | year = {2012}, 772 | volume = {48}, 773 | number = {6}, 774 | pages = {1--29}, 775 | doi = {10.18637/jss.v048.i06}, 776 | } 777 | 778 | @Manual{sirt, 779 | title = {sirt: Supplementary item response theory models}, 780 | author = {Alexander Robitzsch}, 781 | year = {2019}, 782 | note = {R package version 3.3-26}, 783 | url = {https://CRAN.R-project.org/package=sirt}, 784 | } 785 | 786 | @Book{agresti2010, 787 | title = {Analysis of ordinal categorical data}, 788 | publisher = {John Wiley \& Sons}, 789 | year = {2010}, 790 | author = {Agresti, Alan}, 791 | doi = {10.1002/9780470594001}, 792 | owner = {Paul}, 793 | timestamp = {2015.02.03}, 794 | } 795 | 796 | @article{han2012, 797 | title={Fixing the {c} Parameter in the Three-Parameter Logistic Model}, 798 | author={Han, Kyung T}, 799 | journal={Practical Assessment, Research \& Evaluation}, 800 | volume={17}, 801 | number={1}, 802 | pages = {1--24}, 803 | year={2012} 804 | } 805 | 806 | @article{kass1995, 807 | title={Bayes factors}, 808 | author={Kass, Robert E and Raftery, Adrian E}, 809 | journal={Journal of the American Statistical Association}, 810 | volume={90}, 811 | number={430}, 812 | pages={773--795}, 813 | year={1995}, 814 | publisher={Taylor \& Francis} 815 | } 816 | 817 | @Manual{rstanarm2017, 818 | title = {rstanarm: {Bayesian} applied regression modeling via {Stan}.}, 819 | author = {{Stan Development Team}}, 820 | year = {2017}, 821 | note = {R package version 2.17.2}, 822 | url = {http://mc-stan.org/}, 823 | } 824 | 825 | @Manual{afex2015, 826 | title = {\pkg{afex}: Analysis of Factorial Experiments}, 827 | author = {Henrik Singmann and Ben Bolker and Jake Westfall}, 828 | year = {2015}, 829 | note = {R package version 0.15-2}, 830 | owner = {Paul}, 831 | timestamp = {2016.02.13}, 832 | url = {https://CRAN.R-project.org/package=afex}, 833 | } 834 | 835 | @Article{brms1, 836 | author = {Paul-Christian B\"urkner}, 837 | title = {{brms}: An {R} Package for Bayesian Multilevel Models using Stan}, 838 | journal = {Journal of Statistical Software}, 839 | year = {2017}, 840 | volume = {80}, 841 | number = {1}, 842 | pages = {1--28}, 843 | encoding = {UTF-8}, 844 | doi = {10.18637/jss.v080.i01} 845 | } 846 | 847 | @Article{brms2, 848 | title = {Advanced {Bayesian} Multilevel Modeling with the {R} Package {brms}}, 849 | author = {Paul-Christian Bürkner}, 850 | journal = {The R Journal}, 851 | year = {2018}, 852 | volume = {10}, 853 | number = {1}, 854 | pages = {395--411}, 855 | doi = {10.32614/RJ-2018-017}, 856 | encoding = {UTF-8}, 857 | } 858 | 859 | @Article{wood2011, 860 | author = {Wood, Simon N}, 861 | title = {Fast Stable Restricted Maximum Likelihood and Marginal Likelihood Estimation of Semiparametric Generalized Linear Models}, 862 | journal = {Journal of the Royal Statistical Society B (Statistical Methodology)}, 863 | year = {2011}, 864 | volume = {73}, 865 | number = {1}, 866 | pages = {3--36}, 867 | publisher = {John Wiley \& Sons}, 868 | } 869 | 870 | @InProceedings{williams1996, 871 | author = {Williams, Christopher KI and Rasmussen, Carl Edward}, 872 | title = {Gaussian processes for regression}, 873 | booktitle = {Advances in neural information processing systems}, 874 | year = {1996}, 875 | pages = {514--520}, 876 | } 877 | 878 | @MANUAL{nlme2016, 879 | title = {\pkg{nlme}: Linear and Nonlinear Mixed Effects Models}, 880 | author = {Jose Pinheiro and Douglas Bates and Saikat DebRoy and Deepayan Sarkar 881 | and {R Core Team}}, 882 | year = {2016}, 883 | note = {R package version 3.1-124}, 884 | owner = {Paul}, 885 | timestamp = {2016.03.06}, 886 | url = {http://CRAN.R-project.org/package=nlme} 887 | } 888 | 889 | @Manual{R, 890 | title = {R: A Language and Environment for Statistical Computing}, 891 | author = {{R Core Team}}, 892 | organization = {R Foundation for Statistical Computing}, 893 | address = {Vienna, Austria}, 894 | year = {2019}, 895 | url = {https://www.R-project.org/}, 896 | } 897 | 898 | @book{bond2013, 899 | title={Applying the Rasch model: Fundamental measurement in the human sciences}, 900 | author={Bond, Trevor G and Fox, Christine M}, 901 | year={2013}, 902 | publisher={Psychology Press} 903 | } 904 | 905 | 906 | 907 | @article{deboeck2011, 908 | title={The estimation of item response models with the lmer function from the lme4 package in R}, 909 | author={De Boeck, Paul and Bakker, Marjan and Zwitser, Robert and Nivard, Michel and Hofman, Abe and Tuerlinckx, Francis and Partchev, Ivailo}, 910 | journal={Journal of Statistical Software}, 911 | volume={39}, 912 | number={12}, 913 | pages={1--28}, 914 | year={2011}, 915 | doi = {10.18637/jss.v039.i12} 916 | } 917 | 918 | @article{gelman2017, 919 | title={The prior can often only be understood in the context of the likelihood}, 920 | author={Gelman, Andrew and Simpson, Daniel and Betancourt, Michael}, 921 | journal={Entropy}, 922 | volume={19}, 923 | number={10}, 924 | pages={555-567}, 925 | year={2017}, 926 | doi = {10.3390/e19100555}, 927 | publisher={Multidisciplinary Digital Publishing Institute} 928 | } 929 | 930 | @article{blavaan, 931 | title={{blavaan}: {B}ayesian structural equation models via parameter expansion}, 932 | author={Merkle, Edgar C and Rosseel, Yves}, 933 | journal={Journal of Statistical Software}, 934 | year={2018}, 935 | doi = {10.18637/jss.v085.i04} 936 | } 937 | 938 | @Article{psychotree1, 939 | title = {Rasch Trees: A New Method for Detecting Differential Item Functioning in the {R}asch Model}, 940 | author = {Carolin Strobl and Julia Kopf and Achim Zeileis}, 941 | journal = {Psychometrika}, 942 | year = {2015}, 943 | volume = {80}, 944 | number = {2}, 945 | pages = {289--316}, 946 | doi = {10.1007/s11336-013-9388-3}, 947 | } 948 | 949 | @Article{psychotree2, 950 | title = {Tree-Based Global Model Tests for Polytomous {R}asch Models}, 951 | author = {Basil Komboz and Achim Zeileis and Carolin Strobl}, 952 | journal = {Educational and Psychological Measurement}, 953 | year = {2018}, 954 | volume = {78}, 955 | number = {1}, 956 | pages = {128--166}, 957 | doi = {10.1177/0013164416664394}, 958 | } 959 | 960 | @Manual{psychotools, 961 | title = {{psychotools}: Infrastructure for Psychometric Modeling}, 962 | author = {Achim Zeileis and Carolin Strobl and Florian Wickelmaier and Basil Komboz and Julia Kopf}, 963 | year = {2018}, 964 | note = {R package version 0.5-0}, 965 | url = {https://CRAN.R-project.org/package=psychotools}, 966 | } 967 | 968 | @article{carvalho2010, 969 | title={The horseshoe estimator for sparse signals}, 970 | author={Carvalho, Carlos M and Polson, Nicholas G and Scott, James G}, 971 | journal={Biometrika}, 972 | volume={97}, 973 | number={2}, 974 | pages={465--480}, 975 | year={2010}, 976 | publisher={Oxford University Press}, 977 | doi = {10.1093/biomet/asq017} 978 | } 979 | 980 | @MANUAL{jags, 981 | title = {\pkg{JAGS}: Just Another Gibs Sampler}, 982 | author = {Plummer, Martyn}, 983 | year = {2013}, 984 | owner = {Paul}, 985 | timestamp = {2015.01.20}, 986 | url = {http://mcmc-jags.sourceforge.net/} 987 | } 988 | 989 | @article{vanderlinen2015, 990 | title={Optimal {B}ayesian adaptive design for test-item calibration}, 991 | author={van der Linden, Wim J and Ren, Hao}, 992 | journal={Psychometrika}, 993 | volume={80}, 994 | number={2}, 995 | pages={263--288}, 996 | year={2015}, 997 | publisher={Springer}, 998 | doi ={10.1007/s11336-013-9391-8} 999 | } 1000 | 1001 | 1002 | @article{piironen2017, 1003 | title={Sparsity information and regularization in the horseshoe and other shrinkage priors}, 1004 | author={Piironen, Juho and Vehtari, Aki and others}, 1005 | journal={Electronic Journal of Statistics}, 1006 | volume={11}, 1007 | number={2}, 1008 | pages={5018--5051}, 1009 | year={2017}, 1010 | doi = {10.1214/17-EJS1337SI}, 1011 | publisher={The Institute of Mathematical Statistics and the Bernoulli Society} 1012 | } 1013 | 1014 | @book{deboeck2004, 1015 | title={Explanatory item response models}, 1016 | author={De Boeck, Paul and Wilson, M}, 1017 | year={2004}, 1018 | publisher={John Wiley \& Sons}, 1019 | doi = {10.1007/978-1-4757-3990-9} 1020 | } 1021 | 1022 | @book{fox2010, 1023 | title={Bayesian item response modeling: Theory and applications}, 1024 | author={Fox, Jean-Paul}, 1025 | year={2010}, 1026 | publisher={Springer} 1027 | } 1028 | 1029 | @book{levy2017, 1030 | title={Bayesian psychometric modeling}, 1031 | author={Levy, Roy and Mislevy, Robert J}, 1032 | year={2017}, 1033 | publisher={Chapman and Hall/CRC} 1034 | } 1035 | 1036 | @article{rupp2004, 1037 | title={To Bayes or not to Bayes, from whether to when: Applications of Bayesian methodology to modeling}, 1038 | author={Rupp, Andre A and Dey, Dipak K and Zumbo, Bruno D}, 1039 | journal={Structural Equation Modeling}, 1040 | volume={11}, 1041 | number={3}, 1042 | pages={424--451}, 1043 | year={2004}, 1044 | publisher={Taylor \& Francis}, 1045 | doi = {10.1207/s15328007sem1103_7} 1046 | } 1047 | 1048 | @Article{westfall2016, 1049 | author = {Westfall, Jacob and Yarkoni, Tal}, 1050 | title = {Statistically Controlling for Confounding Constructs is Harder than You Think}, 1051 | journal = {PloS one}, 1052 | year = {2016}, 1053 | volume = {11}, 1054 | number = {3}, 1055 | pages = {e0152719}, 1056 | publisher = {Public Library of Science}, 1057 | } 1058 | 1059 | @Manual{loo2018, 1060 | title = {\pkg{loo}: {E}fficient Leave-One-Out Cross-Validation and {WAIC} for {B}ayesian Models.}, 1061 | author = {Aki Vehtari and Andrew Gelman and Jonah Gabry}, 1062 | year = {2018}, 1063 | note = {R package version 1.0.0}, 1064 | url = {https://github.com/stan-dev/loo}, 1065 | } 1066 | 1067 | @Manual{stan2018, 1068 | title = {Stan: A C++ Library for Probability and Sampling, Version 2.18.0}, 1069 | author = {{Stan Development Team}}, 1070 | year = {2018}, 1071 | owner = {Paul}, 1072 | timestamp = {2015.06.18}, 1073 | url = {http://mc-stan.org/}, 1074 | } 1075 | 1076 | @Comment{jabref-meta: databaseType:bibtex;} 1077 | -------------------------------------------------------------------------------- /Bayesian-IRT.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paul-buerkner/Bayesian-IRT-paper/423058f30a06e1ba59edf359851b25be89d54ef3/Bayesian-IRT.pdf -------------------------------------------------------------------------------- /jss.bst: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `jss.bst', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% merlin.mbs (with options: `ay,nat,nm-rvx,keyxyr,dt-beg,yr-par,note-yr,tit-qq,atit-u,trnum-it,vol-bf,volp-com,num-xser,pre-edn,isbn,issn,edpar,pp,ed,xedn,xand,etal-it,revdata,eprint,url,url-blk,doi,nfss') 8 | %% 9 | %% ** BibTeX style file for JSS publications (http://www.jstatsoft.org/) 10 | %% 11 | %% Copyright 1994-2011 Patrick W Daly 12 | %% License: GPL-2 | GPL-3 13 | % =============================================================== 14 | % IMPORTANT NOTICE: 15 | % This bibliographic style (bst) file has been generated from one or 16 | % more master bibliographic style (mbs) files, listed above, provided 17 | % with kind permission of Patrick W Daly. 18 | % 19 | % This generated file can be redistributed and/or modified under the terms 20 | % of the General Public License (Version 2 or 3). 21 | % =============================================================== 22 | % Name and version information of the main mbs file: 23 | % \ProvidesFile{merlin.mbs}[2011/11/18 4.33 (PWD, AO, DPC)] 24 | % For use with BibTeX version 0.99a or later 25 | %------------------------------------------------------------------- 26 | % This bibliography style file is intended for texts in ENGLISH 27 | % This is an author-year citation style bibliography. As such, it is 28 | % non-standard LaTeX, and requires a special package file to function properly. 29 | % Such a package is natbib.sty by Patrick W. Daly 30 | % The form of the \bibitem entries is 31 | % \bibitem[Jones et al.(1990)]{key}... 32 | % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}... 33 | % The essential feature is that the label (the part in brackets) consists 34 | % of the author names, as they should appear in the citation, with the year 35 | % in parentheses following. There must be no space before the opening 36 | % parenthesis! 37 | % With natbib v5.3, a full list of authors may also follow the year. 38 | % In natbib.sty, it is possible to define the type of enclosures that is 39 | % really wanted (brackets or parentheses), but in either case, there must 40 | % be parentheses in the label. 41 | % The \cite command functions as follows: 42 | % \citet{key} ==>> Jones et al. (1990) 43 | % \citet*{key} ==>> Jones, Baker, and Smith (1990) 44 | % \citep{key} ==>> (Jones et al., 1990) 45 | % \citep*{key} ==>> (Jones, Baker, and Smith, 1990) 46 | % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2) 47 | % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990) 48 | % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., 1990, p. 32) 49 | % \citeauthor{key} ==>> Jones et al. 50 | % \citeauthor*{key} ==>> Jones, Baker, and Smith 51 | % \citeyear{key} ==>> 1990 52 | %--------------------------------------------------------------------- 53 | 54 | ENTRY 55 | { address 56 | archive 57 | author 58 | booktitle 59 | chapter 60 | collaboration 61 | doi 62 | edition 63 | editor 64 | eid 65 | eprint 66 | howpublished 67 | institution 68 | isbn 69 | issn 70 | journal 71 | key 72 | month 73 | note 74 | number 75 | numpages 76 | organization 77 | pages 78 | publisher 79 | school 80 | series 81 | title 82 | type 83 | url 84 | volume 85 | year 86 | } 87 | {} 88 | { label extra.label sort.label short.list } 89 | INTEGERS { output.state before.all mid.sentence after.sentence after.block } 90 | FUNCTION {init.state.consts} 91 | { #0 'before.all := 92 | #1 'mid.sentence := 93 | #2 'after.sentence := 94 | #3 'after.block := 95 | } 96 | STRINGS { s t} 97 | FUNCTION {output.nonnull} 98 | { 's := 99 | output.state mid.sentence = 100 | { ", " * write$ } 101 | { output.state after.block = 102 | { add.period$ write$ 103 | newline$ 104 | "\newblock " write$ 105 | } 106 | { output.state before.all = 107 | 'write$ 108 | { add.period$ " " * write$ } 109 | if$ 110 | } 111 | if$ 112 | mid.sentence 'output.state := 113 | } 114 | if$ 115 | s 116 | } 117 | FUNCTION {output} 118 | { duplicate$ empty$ 119 | 'pop$ 120 | 'output.nonnull 121 | if$ 122 | } 123 | FUNCTION {output.check} 124 | { 't := 125 | duplicate$ empty$ 126 | { pop$ "empty " t * " in " * cite$ * warning$ } 127 | 'output.nonnull 128 | if$ 129 | } 130 | FUNCTION {fin.entry} 131 | { add.period$ 132 | write$ 133 | newline$ 134 | } 135 | 136 | FUNCTION {new.block} 137 | { output.state before.all = 138 | 'skip$ 139 | { after.block 'output.state := } 140 | if$ 141 | } 142 | FUNCTION {new.sentence} 143 | { output.state after.block = 144 | 'skip$ 145 | { output.state before.all = 146 | 'skip$ 147 | { after.sentence 'output.state := } 148 | if$ 149 | } 150 | if$ 151 | } 152 | FUNCTION {add.blank} 153 | { " " * before.all 'output.state := 154 | } 155 | 156 | FUNCTION {date.block} 157 | { 158 | new.block 159 | } 160 | 161 | FUNCTION {not} 162 | { { #0 } 163 | { #1 } 164 | if$ 165 | } 166 | FUNCTION {and} 167 | { 'skip$ 168 | { pop$ #0 } 169 | if$ 170 | } 171 | FUNCTION {or} 172 | { { pop$ #1 } 173 | 'skip$ 174 | if$ 175 | } 176 | FUNCTION {non.stop} 177 | { duplicate$ 178 | "}" * add.period$ 179 | #-1 #1 substring$ "." = 180 | } 181 | 182 | STRINGS {z} 183 | 184 | FUNCTION {remove.dots} 185 | { 'z := 186 | "" 187 | { z empty$ not } 188 | { z #1 #2 substring$ 189 | duplicate$ "\." = 190 | { z #3 global.max$ substring$ 'z := * } 191 | { pop$ 192 | z #1 #1 substring$ 193 | z #2 global.max$ substring$ 'z := 194 | duplicate$ "." = 'pop$ 195 | { * } 196 | if$ 197 | } 198 | if$ 199 | } 200 | while$ 201 | } 202 | FUNCTION {new.block.checkb} 203 | { empty$ 204 | swap$ empty$ 205 | and 206 | 'skip$ 207 | 'new.block 208 | if$ 209 | } 210 | FUNCTION {field.or.null} 211 | { duplicate$ empty$ 212 | { pop$ "" } 213 | 'skip$ 214 | if$ 215 | } 216 | FUNCTION {emphasize} 217 | { duplicate$ empty$ 218 | { pop$ "" } 219 | { "\emph{" swap$ * "}" * } 220 | if$ 221 | } 222 | FUNCTION {bolden} 223 | { duplicate$ empty$ 224 | { pop$ "" } 225 | { "\textbf{" swap$ * "}" * } 226 | if$ 227 | } 228 | FUNCTION {tie.or.space.prefix} 229 | { duplicate$ text.length$ #3 < 230 | { "~" } 231 | { " " } 232 | if$ 233 | swap$ 234 | } 235 | 236 | FUNCTION {capitalize} 237 | { "u" change.case$ "t" change.case$ } 238 | 239 | FUNCTION {space.word} 240 | { " " swap$ * " " * } 241 | % Here are the language-specific definitions for explicit words. 242 | % Each function has a name bbl.xxx where xxx is the English word. 243 | % The language selected here is ENGLISH 244 | FUNCTION {bbl.and} 245 | { "and"} 246 | 247 | FUNCTION {bbl.etal} 248 | { "et~al." } 249 | 250 | FUNCTION {bbl.editors} 251 | { "eds." } 252 | 253 | FUNCTION {bbl.editor} 254 | { "ed." } 255 | 256 | FUNCTION {bbl.edby} 257 | { "edited by" } 258 | 259 | FUNCTION {bbl.edition} 260 | { "edition" } 261 | 262 | FUNCTION {bbl.volume} 263 | { "volume" } 264 | 265 | FUNCTION {bbl.of} 266 | { "of" } 267 | 268 | FUNCTION {bbl.number} 269 | { "number" } 270 | 271 | FUNCTION {bbl.nr} 272 | { "no." } 273 | 274 | FUNCTION {bbl.in} 275 | { "in" } 276 | 277 | FUNCTION {bbl.pages} 278 | { "pp." } 279 | 280 | FUNCTION {bbl.page} 281 | { "p." } 282 | 283 | FUNCTION {bbl.eidpp} 284 | { "pages" } 285 | 286 | FUNCTION {bbl.chapter} 287 | { "chapter" } 288 | 289 | FUNCTION {bbl.techrep} 290 | { "Technical Report" } 291 | 292 | FUNCTION {bbl.mthesis} 293 | { "Master's thesis" } 294 | 295 | FUNCTION {bbl.phdthesis} 296 | { "Ph.D. thesis" } 297 | 298 | MACRO {jan} {"January"} 299 | 300 | MACRO {feb} {"February"} 301 | 302 | MACRO {mar} {"March"} 303 | 304 | MACRO {apr} {"April"} 305 | 306 | MACRO {may} {"May"} 307 | 308 | MACRO {jun} {"June"} 309 | 310 | MACRO {jul} {"July"} 311 | 312 | MACRO {aug} {"August"} 313 | 314 | MACRO {sep} {"September"} 315 | 316 | MACRO {oct} {"October"} 317 | 318 | MACRO {nov} {"November"} 319 | 320 | MACRO {dec} {"December"} 321 | 322 | MACRO {acmcs} {"ACM Computing Surveys"} 323 | 324 | MACRO {acta} {"Acta Informatica"} 325 | 326 | MACRO {cacm} {"Communications of the ACM"} 327 | 328 | MACRO {ibmjrd} {"IBM Journal of Research and Development"} 329 | 330 | MACRO {ibmsj} {"IBM Systems Journal"} 331 | 332 | MACRO {ieeese} {"IEEE Transactions on Software Engineering"} 333 | 334 | MACRO {ieeetc} {"IEEE Transactions on Computers"} 335 | 336 | MACRO {ieeetcad} 337 | {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} 338 | 339 | MACRO {ipl} {"Information Processing Letters"} 340 | 341 | MACRO {jacm} {"Journal of the ACM"} 342 | 343 | MACRO {jcss} {"Journal of Computer and System Sciences"} 344 | 345 | MACRO {scp} {"Science of Computer Programming"} 346 | 347 | MACRO {sicomp} {"SIAM Journal on Computing"} 348 | 349 | MACRO {tocs} {"ACM Transactions on Computer Systems"} 350 | 351 | MACRO {tods} {"ACM Transactions on Database Systems"} 352 | 353 | MACRO {tog} {"ACM Transactions on Graphics"} 354 | 355 | MACRO {toms} {"ACM Transactions on Mathematical Software"} 356 | 357 | MACRO {toois} {"ACM Transactions on Office Information Systems"} 358 | 359 | MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} 360 | 361 | MACRO {tcs} {"Theoretical Computer Science"} 362 | FUNCTION {bibinfo.check} 363 | { swap$ 364 | duplicate$ missing$ 365 | { 366 | pop$ pop$ 367 | "" 368 | } 369 | { duplicate$ empty$ 370 | { 371 | swap$ pop$ 372 | } 373 | { swap$ 374 | pop$ 375 | } 376 | if$ 377 | } 378 | if$ 379 | } 380 | FUNCTION {bibinfo.warn} 381 | { swap$ 382 | duplicate$ missing$ 383 | { 384 | swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ 385 | "" 386 | } 387 | { duplicate$ empty$ 388 | { 389 | swap$ "empty " swap$ * " in " * cite$ * warning$ 390 | } 391 | { swap$ 392 | pop$ 393 | } 394 | if$ 395 | } 396 | if$ 397 | } 398 | FUNCTION {format.eprint} 399 | { eprint duplicate$ empty$ 400 | 'skip$ 401 | { "\eprint" 402 | archive empty$ 403 | 'skip$ 404 | { "[" * archive * "]" * } 405 | if$ 406 | "{" * swap$ * "}" * 407 | } 408 | if$ 409 | } 410 | FUNCTION {format.url} 411 | { 412 | url 413 | duplicate$ empty$ 414 | { pop$ "" } 415 | { "\urlprefix\url{" swap$ * "}" * } 416 | if$ 417 | } 418 | 419 | INTEGERS { nameptr namesleft numnames } 420 | 421 | 422 | STRINGS { bibinfo} 423 | 424 | FUNCTION {format.names} 425 | { 'bibinfo := 426 | duplicate$ empty$ 'skip$ { 427 | 's := 428 | "" 't := 429 | #1 'nameptr := 430 | s num.names$ 'numnames := 431 | numnames 'namesleft := 432 | { namesleft #0 > } 433 | { s nameptr 434 | "{vv~}{ll}{ jj}{ f{}}" 435 | format.name$ 436 | remove.dots 437 | bibinfo bibinfo.check 438 | 't := 439 | nameptr #1 > 440 | { 441 | namesleft #1 > 442 | { ", " * t * } 443 | { 444 | s nameptr "{ll}" format.name$ duplicate$ "others" = 445 | { 't := } 446 | { pop$ } 447 | if$ 448 | "," * 449 | t "others" = 450 | { 451 | " " * bbl.etal emphasize * 452 | } 453 | { " " * t * } 454 | if$ 455 | } 456 | if$ 457 | } 458 | 't 459 | if$ 460 | nameptr #1 + 'nameptr := 461 | namesleft #1 - 'namesleft := 462 | } 463 | while$ 464 | } if$ 465 | } 466 | FUNCTION {format.names.ed} 467 | { 468 | 'bibinfo := 469 | duplicate$ empty$ 'skip$ { 470 | 's := 471 | "" 't := 472 | #1 'nameptr := 473 | s num.names$ 'numnames := 474 | numnames 'namesleft := 475 | { namesleft #0 > } 476 | { s nameptr 477 | "{f{}~}{vv~}{ll}{ jj}" 478 | format.name$ 479 | remove.dots 480 | bibinfo bibinfo.check 481 | 't := 482 | nameptr #1 > 483 | { 484 | namesleft #1 > 485 | { ", " * t * } 486 | { 487 | s nameptr "{ll}" format.name$ duplicate$ "others" = 488 | { 't := } 489 | { pop$ } 490 | if$ 491 | "," * 492 | t "others" = 493 | { 494 | 495 | " " * bbl.etal emphasize * 496 | } 497 | { " " * t * } 498 | if$ 499 | } 500 | if$ 501 | } 502 | 't 503 | if$ 504 | nameptr #1 + 'nameptr := 505 | namesleft #1 - 'namesleft := 506 | } 507 | while$ 508 | } if$ 509 | } 510 | FUNCTION {format.key} 511 | { empty$ 512 | { key field.or.null } 513 | { "" } 514 | if$ 515 | } 516 | 517 | FUNCTION {format.authors} 518 | { author "author" format.names 519 | duplicate$ empty$ 'skip$ 520 | { collaboration "collaboration" bibinfo.check 521 | duplicate$ empty$ 'skip$ 522 | { " (" swap$ * ")" * } 523 | if$ 524 | * 525 | } 526 | if$ 527 | } 528 | FUNCTION {get.bbl.editor} 529 | { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } 530 | 531 | FUNCTION {format.editors} 532 | { editor "editor" format.names duplicate$ empty$ 'skip$ 533 | { 534 | " " * 535 | get.bbl.editor 536 | "(" swap$ * ")" * 537 | * 538 | } 539 | if$ 540 | } 541 | FUNCTION {format.isbn} 542 | { isbn "isbn" bibinfo.check 543 | duplicate$ empty$ 'skip$ 544 | { 545 | new.block 546 | "ISBN " swap$ * 547 | } 548 | if$ 549 | } 550 | 551 | FUNCTION {format.issn} 552 | { issn "issn" bibinfo.check 553 | duplicate$ empty$ 'skip$ 554 | { 555 | new.block 556 | "ISSN " swap$ * 557 | } 558 | if$ 559 | } 560 | 561 | FUNCTION {format.doi} 562 | { doi empty$ 563 | { "" } 564 | { 565 | new.block 566 | "\doi{" doi * "}" * 567 | } 568 | if$ 569 | } 570 | FUNCTION {format.note} 571 | { 572 | note empty$ 573 | { "" } 574 | { note #1 #1 substring$ 575 | duplicate$ "{" = 576 | 'skip$ 577 | { output.state mid.sentence = 578 | { "l" } 579 | { "u" } 580 | if$ 581 | change.case$ 582 | } 583 | if$ 584 | note #2 global.max$ substring$ * "note" bibinfo.check 585 | } 586 | if$ 587 | } 588 | 589 | FUNCTION {format.title} 590 | { title 591 | "title" bibinfo.check 592 | duplicate$ empty$ 'skip$ 593 | { 594 | "\enquote{" swap$ * 595 | add.period$ "}" * 596 | } 597 | if$ 598 | } 599 | FUNCTION {format.full.names} 600 | {'s := 601 | "" 't := 602 | #1 'nameptr := 603 | s num.names$ 'numnames := 604 | numnames 'namesleft := 605 | { namesleft #0 > } 606 | { s nameptr 607 | "{vv~}{ll}" format.name$ 608 | 't := 609 | nameptr #1 > 610 | { 611 | namesleft #1 > 612 | { ", " * t * } 613 | { 614 | s nameptr "{ll}" format.name$ duplicate$ "others" = 615 | { 't := } 616 | { pop$ } 617 | if$ 618 | t "others" = 619 | { 620 | " " * bbl.etal emphasize * 621 | } 622 | { 623 | numnames #2 > 624 | { "," * } 625 | 'skip$ 626 | if$ 627 | bbl.and 628 | space.word * t * 629 | } 630 | if$ 631 | } 632 | if$ 633 | } 634 | 't 635 | if$ 636 | nameptr #1 + 'nameptr := 637 | namesleft #1 - 'namesleft := 638 | } 639 | while$ 640 | } 641 | 642 | FUNCTION {author.editor.key.full} 643 | { author empty$ 644 | { editor empty$ 645 | { key empty$ 646 | { cite$ #1 #3 substring$ } 647 | 'key 648 | if$ 649 | } 650 | { editor format.full.names } 651 | if$ 652 | } 653 | { author format.full.names } 654 | if$ 655 | } 656 | 657 | FUNCTION {author.key.full} 658 | { author empty$ 659 | { key empty$ 660 | { cite$ #1 #3 substring$ } 661 | 'key 662 | if$ 663 | } 664 | { author format.full.names } 665 | if$ 666 | } 667 | 668 | FUNCTION {editor.key.full} 669 | { editor empty$ 670 | { key empty$ 671 | { cite$ #1 #3 substring$ } 672 | 'key 673 | if$ 674 | } 675 | { editor format.full.names } 676 | if$ 677 | } 678 | 679 | FUNCTION {make.full.names} 680 | { type$ "book" = 681 | type$ "inbook" = 682 | or 683 | 'author.editor.key.full 684 | { type$ "proceedings" = 685 | 'editor.key.full 686 | 'author.key.full 687 | if$ 688 | } 689 | if$ 690 | } 691 | 692 | FUNCTION {output.bibitem} 693 | { newline$ 694 | "\bibitem[{" write$ 695 | label write$ 696 | ")" make.full.names duplicate$ short.list = 697 | { pop$ } 698 | { * } 699 | if$ 700 | "}]{" * write$ 701 | cite$ write$ 702 | "}" write$ 703 | newline$ 704 | "" 705 | before.all 'output.state := 706 | } 707 | 708 | FUNCTION {n.dashify} 709 | { 710 | 't := 711 | "" 712 | { t empty$ not } 713 | { t #1 #1 substring$ "-" = 714 | { t #1 #2 substring$ "--" = not 715 | { "--" * 716 | t #2 global.max$ substring$ 't := 717 | } 718 | { { t #1 #1 substring$ "-" = } 719 | { "-" * 720 | t #2 global.max$ substring$ 't := 721 | } 722 | while$ 723 | } 724 | if$ 725 | } 726 | { t #1 #1 substring$ * 727 | t #2 global.max$ substring$ 't := 728 | } 729 | if$ 730 | } 731 | while$ 732 | } 733 | 734 | FUNCTION {word.in} 735 | { bbl.in capitalize 736 | " " * } 737 | 738 | FUNCTION {format.date} 739 | { year "year" bibinfo.check duplicate$ empty$ 740 | { 741 | "empty year in " cite$ * "; set to ????" * warning$ 742 | pop$ "????" 743 | } 744 | 'skip$ 745 | if$ 746 | extra.label * 747 | before.all 'output.state := 748 | " (" swap$ * ")" * 749 | } 750 | FUNCTION {format.btitle} 751 | { title "title" bibinfo.check 752 | duplicate$ empty$ 'skip$ 753 | { 754 | emphasize 755 | } 756 | if$ 757 | } 758 | FUNCTION {either.or.check} 759 | { empty$ 760 | 'pop$ 761 | { "can't use both " swap$ * " fields in " * cite$ * warning$ } 762 | if$ 763 | } 764 | FUNCTION {format.bvolume} 765 | { volume empty$ 766 | { "" } 767 | { bbl.volume volume tie.or.space.prefix 768 | "volume" bibinfo.check * * 769 | series "series" bibinfo.check 770 | duplicate$ empty$ 'pop$ 771 | { swap$ bbl.of space.word * swap$ 772 | emphasize * } 773 | if$ 774 | "volume and number" number either.or.check 775 | } 776 | if$ 777 | } 778 | FUNCTION {format.number.series} 779 | { volume empty$ 780 | { number empty$ 781 | { series field.or.null } 782 | { series empty$ 783 | { number "number" bibinfo.check } 784 | { output.state mid.sentence = 785 | { bbl.number } 786 | { bbl.number capitalize } 787 | if$ 788 | number tie.or.space.prefix "number" bibinfo.check * * 789 | bbl.in space.word * 790 | series "series" bibinfo.check * 791 | } 792 | if$ 793 | } 794 | if$ 795 | } 796 | { "" } 797 | if$ 798 | } 799 | 800 | FUNCTION {format.edition} 801 | { edition duplicate$ empty$ 'skip$ 802 | { 803 | output.state mid.sentence = 804 | { "l" } 805 | { "t" } 806 | if$ change.case$ 807 | "edition" bibinfo.check 808 | " " * bbl.edition * 809 | } 810 | if$ 811 | } 812 | INTEGERS { multiresult } 813 | FUNCTION {multi.page.check} 814 | { 't := 815 | #0 'multiresult := 816 | { multiresult not 817 | t empty$ not 818 | and 819 | } 820 | { t #1 #1 substring$ 821 | duplicate$ "-" = 822 | swap$ duplicate$ "," = 823 | swap$ "+" = 824 | or or 825 | { #1 'multiresult := } 826 | { t #2 global.max$ substring$ 't := } 827 | if$ 828 | } 829 | while$ 830 | multiresult 831 | } 832 | FUNCTION {format.pages} 833 | { pages duplicate$ empty$ 'skip$ 834 | { duplicate$ multi.page.check 835 | { 836 | bbl.pages swap$ 837 | n.dashify 838 | } 839 | { 840 | bbl.page swap$ 841 | } 842 | if$ 843 | tie.or.space.prefix 844 | "pages" bibinfo.check 845 | * * 846 | } 847 | if$ 848 | } 849 | FUNCTION {format.journal.pages} 850 | { pages duplicate$ empty$ 'pop$ 851 | { swap$ duplicate$ empty$ 852 | { pop$ pop$ format.pages } 853 | { 854 | ", " * 855 | swap$ 856 | n.dashify 857 | "pages" bibinfo.check 858 | * 859 | } 860 | if$ 861 | } 862 | if$ 863 | } 864 | FUNCTION {format.journal.eid} 865 | { eid "eid" bibinfo.check 866 | duplicate$ empty$ 'pop$ 867 | { swap$ duplicate$ empty$ 'skip$ 868 | { 869 | ", " * 870 | } 871 | if$ 872 | swap$ * 873 | numpages empty$ 'skip$ 874 | { bbl.eidpp numpages tie.or.space.prefix 875 | "numpages" bibinfo.check * * 876 | " (" swap$ * ")" * * 877 | } 878 | if$ 879 | } 880 | if$ 881 | } 882 | FUNCTION {format.vol.num.pages} 883 | { volume field.or.null 884 | duplicate$ empty$ 'skip$ 885 | { 886 | "volume" bibinfo.check 887 | } 888 | if$ 889 | bolden 890 | number "number" bibinfo.check duplicate$ empty$ 'skip$ 891 | { 892 | swap$ duplicate$ empty$ 893 | { "there's a number but no volume in " cite$ * warning$ } 894 | 'skip$ 895 | if$ 896 | swap$ 897 | "(" swap$ * ")" * 898 | } 899 | if$ * 900 | eid empty$ 901 | { format.journal.pages } 902 | { format.journal.eid } 903 | if$ 904 | } 905 | 906 | FUNCTION {format.chapter.pages} 907 | { chapter empty$ 908 | 'format.pages 909 | { type empty$ 910 | { bbl.chapter } 911 | { type "l" change.case$ 912 | "type" bibinfo.check 913 | } 914 | if$ 915 | chapter tie.or.space.prefix 916 | "chapter" bibinfo.check 917 | * * 918 | pages empty$ 919 | 'skip$ 920 | { ", " * format.pages * } 921 | if$ 922 | } 923 | if$ 924 | } 925 | 926 | FUNCTION {format.booktitle} 927 | { 928 | booktitle "booktitle" bibinfo.check 929 | emphasize 930 | } 931 | FUNCTION {format.in.ed.booktitle} 932 | { format.booktitle duplicate$ empty$ 'skip$ 933 | { 934 | editor "editor" format.names.ed duplicate$ empty$ 'pop$ 935 | { 936 | " " * 937 | get.bbl.editor 938 | "(" swap$ * "), " * 939 | * swap$ 940 | * } 941 | if$ 942 | word.in swap$ * 943 | } 944 | if$ 945 | } 946 | FUNCTION {format.thesis.type} 947 | { type duplicate$ empty$ 948 | 'pop$ 949 | { swap$ pop$ 950 | "t" change.case$ "type" bibinfo.check 951 | } 952 | if$ 953 | } 954 | FUNCTION {format.tr.number} 955 | { number "number" bibinfo.check 956 | type duplicate$ empty$ 957 | { pop$ bbl.techrep } 958 | 'skip$ 959 | if$ 960 | "type" bibinfo.check 961 | swap$ duplicate$ empty$ 962 | { pop$ "t" change.case$ } 963 | { tie.or.space.prefix * * } 964 | if$ 965 | } 966 | FUNCTION {format.article.crossref} 967 | { 968 | word.in 969 | " \cite{" * crossref * "}" * 970 | } 971 | FUNCTION {format.book.crossref} 972 | { volume duplicate$ empty$ 973 | { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ 974 | pop$ word.in 975 | } 976 | { bbl.volume 977 | capitalize 978 | swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * 979 | } 980 | if$ 981 | " \cite{" * crossref * "}" * 982 | } 983 | FUNCTION {format.incoll.inproc.crossref} 984 | { 985 | word.in 986 | " \cite{" * crossref * "}" * 987 | } 988 | FUNCTION {format.org.or.pub} 989 | { 't := 990 | "" 991 | address empty$ t empty$ and 992 | 'skip$ 993 | { 994 | t empty$ 995 | { address "address" bibinfo.check * 996 | } 997 | { t * 998 | address empty$ 999 | 'skip$ 1000 | { ", " * address "address" bibinfo.check * } 1001 | if$ 1002 | } 1003 | if$ 1004 | } 1005 | if$ 1006 | } 1007 | FUNCTION {format.publisher.address} 1008 | { publisher "publisher" bibinfo.warn format.org.or.pub 1009 | } 1010 | 1011 | FUNCTION {format.organization.address} 1012 | { organization "organization" bibinfo.check format.org.or.pub 1013 | } 1014 | 1015 | FUNCTION {article} 1016 | { output.bibitem 1017 | format.authors "author" output.check 1018 | author format.key output 1019 | format.date "year" output.check 1020 | date.block 1021 | format.title "title" output.check 1022 | new.block 1023 | crossref missing$ 1024 | { 1025 | journal 1026 | "journal" bibinfo.check 1027 | emphasize 1028 | "journal" output.check 1029 | format.vol.num.pages output 1030 | } 1031 | { format.article.crossref output.nonnull 1032 | format.pages output 1033 | } 1034 | if$ 1035 | format.issn output 1036 | format.doi output 1037 | new.block 1038 | format.note output 1039 | format.eprint output 1040 | format.url output 1041 | fin.entry 1042 | } 1043 | FUNCTION {book} 1044 | { output.bibitem 1045 | author empty$ 1046 | { format.editors "author and editor" output.check 1047 | editor format.key output 1048 | } 1049 | { format.authors output.nonnull 1050 | crossref missing$ 1051 | { "author and editor" editor either.or.check } 1052 | 'skip$ 1053 | if$ 1054 | } 1055 | if$ 1056 | format.date "year" output.check 1057 | date.block 1058 | format.btitle "title" output.check 1059 | crossref missing$ 1060 | { format.bvolume output 1061 | new.block 1062 | format.number.series output 1063 | format.edition output 1064 | new.sentence 1065 | format.publisher.address output 1066 | } 1067 | { 1068 | new.block 1069 | format.book.crossref output.nonnull 1070 | } 1071 | if$ 1072 | format.isbn output 1073 | format.doi output 1074 | new.block 1075 | format.note output 1076 | format.eprint output 1077 | format.url output 1078 | fin.entry 1079 | } 1080 | FUNCTION {booklet} 1081 | { output.bibitem 1082 | format.authors output 1083 | author format.key output 1084 | format.date "year" output.check 1085 | date.block 1086 | format.title "title" output.check 1087 | new.block 1088 | howpublished "howpublished" bibinfo.check output 1089 | address "address" bibinfo.check output 1090 | format.isbn output 1091 | format.doi output 1092 | new.block 1093 | format.note output 1094 | format.eprint output 1095 | format.url output 1096 | fin.entry 1097 | } 1098 | 1099 | FUNCTION {inbook} 1100 | { output.bibitem 1101 | author empty$ 1102 | { format.editors "author and editor" output.check 1103 | editor format.key output 1104 | } 1105 | { format.authors output.nonnull 1106 | crossref missing$ 1107 | { "author and editor" editor either.or.check } 1108 | 'skip$ 1109 | if$ 1110 | } 1111 | if$ 1112 | format.date "year" output.check 1113 | date.block 1114 | format.btitle "title" output.check 1115 | crossref missing$ 1116 | { 1117 | format.bvolume output 1118 | format.chapter.pages "chapter and pages" output.check 1119 | new.block 1120 | format.number.series output 1121 | format.edition output 1122 | new.sentence 1123 | format.publisher.address output 1124 | } 1125 | { 1126 | format.chapter.pages "chapter and pages" output.check 1127 | new.block 1128 | format.book.crossref output.nonnull 1129 | } 1130 | if$ 1131 | crossref missing$ 1132 | { format.isbn output } 1133 | 'skip$ 1134 | if$ 1135 | format.doi output 1136 | new.block 1137 | format.note output 1138 | format.eprint output 1139 | format.url output 1140 | fin.entry 1141 | } 1142 | 1143 | FUNCTION {incollection} 1144 | { output.bibitem 1145 | format.authors "author" output.check 1146 | author format.key output 1147 | format.date "year" output.check 1148 | date.block 1149 | format.title "title" output.check 1150 | new.block 1151 | crossref missing$ 1152 | { format.in.ed.booktitle "booktitle" output.check 1153 | format.bvolume output 1154 | format.number.series output 1155 | format.edition output 1156 | format.chapter.pages output 1157 | new.sentence 1158 | format.publisher.address output 1159 | format.isbn output 1160 | } 1161 | { format.incoll.inproc.crossref output.nonnull 1162 | format.chapter.pages output 1163 | } 1164 | if$ 1165 | format.doi output 1166 | new.block 1167 | format.note output 1168 | format.eprint output 1169 | format.url output 1170 | fin.entry 1171 | } 1172 | FUNCTION {inproceedings} 1173 | { output.bibitem 1174 | format.authors "author" output.check 1175 | author format.key output 1176 | format.date "year" output.check 1177 | date.block 1178 | format.title "title" output.check 1179 | new.block 1180 | crossref missing$ 1181 | { format.in.ed.booktitle "booktitle" output.check 1182 | format.bvolume output 1183 | format.number.series output 1184 | format.pages output 1185 | new.sentence 1186 | publisher empty$ 1187 | { format.organization.address output } 1188 | { organization "organization" bibinfo.check output 1189 | format.publisher.address output 1190 | } 1191 | if$ 1192 | format.isbn output 1193 | format.issn output 1194 | } 1195 | { format.incoll.inproc.crossref output.nonnull 1196 | format.pages output 1197 | } 1198 | if$ 1199 | format.doi output 1200 | new.block 1201 | format.note output 1202 | format.eprint output 1203 | format.url output 1204 | fin.entry 1205 | } 1206 | FUNCTION {conference} { inproceedings } 1207 | FUNCTION {manual} 1208 | { output.bibitem 1209 | format.authors output 1210 | author format.key output 1211 | format.date "year" output.check 1212 | date.block 1213 | format.btitle "title" output.check 1214 | organization address new.block.checkb 1215 | organization "organization" bibinfo.check output 1216 | address "address" bibinfo.check output 1217 | format.edition output 1218 | format.doi output 1219 | new.block 1220 | format.note output 1221 | format.eprint output 1222 | format.url output 1223 | fin.entry 1224 | } 1225 | 1226 | FUNCTION {mastersthesis} 1227 | { output.bibitem 1228 | format.authors "author" output.check 1229 | author format.key output 1230 | format.date "year" output.check 1231 | date.block 1232 | format.btitle 1233 | "title" output.check 1234 | new.block 1235 | bbl.mthesis format.thesis.type output.nonnull 1236 | school "school" bibinfo.warn output 1237 | address "address" bibinfo.check output 1238 | format.doi output 1239 | new.block 1240 | format.note output 1241 | format.eprint output 1242 | format.url output 1243 | fin.entry 1244 | } 1245 | 1246 | FUNCTION {misc} 1247 | { output.bibitem 1248 | format.authors output 1249 | author format.key output 1250 | format.date "year" output.check 1251 | date.block 1252 | format.title output 1253 | new.block 1254 | howpublished "howpublished" bibinfo.check output 1255 | format.doi output 1256 | new.block 1257 | format.note output 1258 | format.eprint output 1259 | format.url output 1260 | fin.entry 1261 | } 1262 | FUNCTION {phdthesis} 1263 | { output.bibitem 1264 | format.authors "author" output.check 1265 | author format.key output 1266 | format.date "year" output.check 1267 | date.block 1268 | format.btitle 1269 | "title" output.check 1270 | new.block 1271 | bbl.phdthesis format.thesis.type output.nonnull 1272 | school "school" bibinfo.warn output 1273 | address "address" bibinfo.check output 1274 | format.doi output 1275 | new.block 1276 | format.note output 1277 | format.eprint output 1278 | format.url output 1279 | fin.entry 1280 | } 1281 | 1282 | FUNCTION {proceedings} 1283 | { output.bibitem 1284 | format.editors output 1285 | editor format.key output 1286 | format.date "year" output.check 1287 | date.block 1288 | format.btitle "title" output.check 1289 | format.bvolume output 1290 | format.number.series output 1291 | new.sentence 1292 | publisher empty$ 1293 | { format.organization.address output } 1294 | { organization "organization" bibinfo.check output 1295 | format.publisher.address output 1296 | } 1297 | if$ 1298 | format.isbn output 1299 | format.issn output 1300 | format.doi output 1301 | new.block 1302 | format.note output 1303 | format.eprint output 1304 | format.url output 1305 | fin.entry 1306 | } 1307 | 1308 | FUNCTION {techreport} 1309 | { output.bibitem 1310 | format.authors "author" output.check 1311 | author format.key output 1312 | format.date "year" output.check 1313 | date.block 1314 | format.title 1315 | "title" output.check 1316 | new.block 1317 | format.tr.number emphasize output.nonnull 1318 | institution "institution" bibinfo.warn output 1319 | address "address" bibinfo.check output 1320 | format.doi output 1321 | new.block 1322 | format.note output 1323 | format.eprint output 1324 | format.url output 1325 | fin.entry 1326 | } 1327 | 1328 | FUNCTION {unpublished} 1329 | { output.bibitem 1330 | format.authors "author" output.check 1331 | author format.key output 1332 | format.date "year" output.check 1333 | date.block 1334 | format.title "title" output.check 1335 | format.doi output 1336 | new.block 1337 | format.note "note" output.check 1338 | format.eprint output 1339 | format.url output 1340 | fin.entry 1341 | } 1342 | 1343 | FUNCTION {default.type} { misc } 1344 | READ 1345 | FUNCTION {sortify} 1346 | { purify$ 1347 | "l" change.case$ 1348 | } 1349 | INTEGERS { len } 1350 | FUNCTION {chop.word} 1351 | { 's := 1352 | 'len := 1353 | s #1 len substring$ = 1354 | { s len #1 + global.max$ substring$ } 1355 | 's 1356 | if$ 1357 | } 1358 | FUNCTION {format.lab.names} 1359 | { 's := 1360 | "" 't := 1361 | s #1 "{vv~}{ll}" format.name$ 1362 | s num.names$ duplicate$ 1363 | #2 > 1364 | { pop$ 1365 | " " * bbl.etal emphasize * 1366 | } 1367 | { #2 < 1368 | 'skip$ 1369 | { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = 1370 | { 1371 | " " * bbl.etal emphasize * 1372 | } 1373 | { bbl.and space.word * s #2 "{vv~}{ll}" format.name$ 1374 | * } 1375 | if$ 1376 | } 1377 | if$ 1378 | } 1379 | if$ 1380 | } 1381 | 1382 | FUNCTION {author.key.label} 1383 | { author empty$ 1384 | { key empty$ 1385 | { cite$ #1 #3 substring$ } 1386 | 'key 1387 | if$ 1388 | } 1389 | { author format.lab.names } 1390 | if$ 1391 | } 1392 | 1393 | FUNCTION {author.editor.key.label} 1394 | { author empty$ 1395 | { editor empty$ 1396 | { key empty$ 1397 | { cite$ #1 #3 substring$ } 1398 | 'key 1399 | if$ 1400 | } 1401 | { editor format.lab.names } 1402 | if$ 1403 | } 1404 | { author format.lab.names } 1405 | if$ 1406 | } 1407 | 1408 | FUNCTION {editor.key.label} 1409 | { editor empty$ 1410 | { key empty$ 1411 | { cite$ #1 #3 substring$ } 1412 | 'key 1413 | if$ 1414 | } 1415 | { editor format.lab.names } 1416 | if$ 1417 | } 1418 | 1419 | FUNCTION {calc.short.authors} 1420 | { type$ "book" = 1421 | type$ "inbook" = 1422 | or 1423 | 'author.editor.key.label 1424 | { type$ "proceedings" = 1425 | 'editor.key.label 1426 | 'author.key.label 1427 | if$ 1428 | } 1429 | if$ 1430 | 'short.list := 1431 | } 1432 | 1433 | FUNCTION {calc.label} 1434 | { calc.short.authors 1435 | short.list 1436 | "(" 1437 | * 1438 | year duplicate$ empty$ 1439 | short.list key field.or.null = or 1440 | { pop$ "" } 1441 | 'skip$ 1442 | if$ 1443 | * 1444 | 'label := 1445 | } 1446 | 1447 | FUNCTION {sort.format.names} 1448 | { 's := 1449 | #1 'nameptr := 1450 | "" 1451 | s num.names$ 'numnames := 1452 | numnames 'namesleft := 1453 | { namesleft #0 > } 1454 | { s nameptr 1455 | "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" 1456 | format.name$ 't := 1457 | nameptr #1 > 1458 | { 1459 | " " * 1460 | namesleft #1 = t "others" = and 1461 | { "zzzzz" 't := } 1462 | 'skip$ 1463 | if$ 1464 | t sortify * 1465 | } 1466 | { t sortify * } 1467 | if$ 1468 | nameptr #1 + 'nameptr := 1469 | namesleft #1 - 'namesleft := 1470 | } 1471 | while$ 1472 | } 1473 | 1474 | FUNCTION {sort.format.title} 1475 | { 't := 1476 | "A " #2 1477 | "An " #3 1478 | "The " #4 t chop.word 1479 | chop.word 1480 | chop.word 1481 | sortify 1482 | #1 global.max$ substring$ 1483 | } 1484 | FUNCTION {author.sort} 1485 | { author empty$ 1486 | { key empty$ 1487 | { "to sort, need author or key in " cite$ * warning$ 1488 | "" 1489 | } 1490 | { key sortify } 1491 | if$ 1492 | } 1493 | { author sort.format.names } 1494 | if$ 1495 | } 1496 | FUNCTION {author.editor.sort} 1497 | { author empty$ 1498 | { editor empty$ 1499 | { key empty$ 1500 | { "to sort, need author, editor, or key in " cite$ * warning$ 1501 | "" 1502 | } 1503 | { key sortify } 1504 | if$ 1505 | } 1506 | { editor sort.format.names } 1507 | if$ 1508 | } 1509 | { author sort.format.names } 1510 | if$ 1511 | } 1512 | FUNCTION {editor.sort} 1513 | { editor empty$ 1514 | { key empty$ 1515 | { "to sort, need editor or key in " cite$ * warning$ 1516 | "" 1517 | } 1518 | { key sortify } 1519 | if$ 1520 | } 1521 | { editor sort.format.names } 1522 | if$ 1523 | } 1524 | FUNCTION {presort} 1525 | { calc.label 1526 | label sortify 1527 | " " 1528 | * 1529 | type$ "book" = 1530 | type$ "inbook" = 1531 | or 1532 | 'author.editor.sort 1533 | { type$ "proceedings" = 1534 | 'editor.sort 1535 | 'author.sort 1536 | if$ 1537 | } 1538 | if$ 1539 | #1 entry.max$ substring$ 1540 | 'sort.label := 1541 | sort.label 1542 | * 1543 | " " 1544 | * 1545 | title field.or.null 1546 | sort.format.title 1547 | * 1548 | #1 entry.max$ substring$ 1549 | 'sort.key$ := 1550 | } 1551 | 1552 | ITERATE {presort} 1553 | SORT 1554 | STRINGS { last.label next.extra } 1555 | INTEGERS { last.extra.num last.extra.num.extended last.extra.num.blank number.label } 1556 | FUNCTION {initialize.extra.label.stuff} 1557 | { #0 int.to.chr$ 'last.label := 1558 | "" 'next.extra := 1559 | #0 'last.extra.num := 1560 | "a" chr.to.int$ #1 - 'last.extra.num.blank := 1561 | last.extra.num.blank 'last.extra.num.extended := 1562 | #0 'number.label := 1563 | } 1564 | FUNCTION {forward.pass} 1565 | { last.label label = 1566 | { last.extra.num #1 + 'last.extra.num := 1567 | last.extra.num "z" chr.to.int$ > 1568 | { "a" chr.to.int$ 'last.extra.num := 1569 | last.extra.num.extended #1 + 'last.extra.num.extended := 1570 | } 1571 | 'skip$ 1572 | if$ 1573 | last.extra.num.extended last.extra.num.blank > 1574 | { last.extra.num.extended int.to.chr$ 1575 | last.extra.num int.to.chr$ 1576 | * 'extra.label := } 1577 | { last.extra.num int.to.chr$ 'extra.label := } 1578 | if$ 1579 | } 1580 | { "a" chr.to.int$ 'last.extra.num := 1581 | "" 'extra.label := 1582 | label 'last.label := 1583 | } 1584 | if$ 1585 | number.label #1 + 'number.label := 1586 | } 1587 | FUNCTION {reverse.pass} 1588 | { next.extra "b" = 1589 | { "a" 'extra.label := } 1590 | 'skip$ 1591 | if$ 1592 | extra.label 'next.extra := 1593 | extra.label 1594 | duplicate$ empty$ 1595 | 'skip$ 1596 | { "{\natexlab{" swap$ * "}}" * } 1597 | if$ 1598 | 'extra.label := 1599 | label extra.label * 'label := 1600 | } 1601 | EXECUTE {initialize.extra.label.stuff} 1602 | ITERATE {forward.pass} 1603 | REVERSE {reverse.pass} 1604 | FUNCTION {bib.sort.order} 1605 | { sort.label 1606 | " " 1607 | * 1608 | year field.or.null sortify 1609 | * 1610 | " " 1611 | * 1612 | title field.or.null 1613 | sort.format.title 1614 | * 1615 | #1 entry.max$ substring$ 1616 | 'sort.key$ := 1617 | } 1618 | ITERATE {bib.sort.order} 1619 | SORT 1620 | FUNCTION {begin.bib} 1621 | { preamble$ empty$ 1622 | 'skip$ 1623 | { preamble$ write$ newline$ } 1624 | if$ 1625 | "\begin{thebibliography}{" number.label int.to.str$ * "}" * 1626 | write$ newline$ 1627 | "\newcommand{\enquote}[1]{``#1''}" 1628 | write$ newline$ 1629 | "\providecommand{\natexlab}[1]{#1}" 1630 | write$ newline$ 1631 | "\providecommand{\url}[1]{\texttt{#1}}" 1632 | write$ newline$ 1633 | "\providecommand{\urlprefix}{URL }" 1634 | write$ newline$ 1635 | "\expandafter\ifx\csname urlstyle\endcsname\relax" 1636 | write$ newline$ 1637 | " \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else" 1638 | write$ newline$ 1639 | " \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi" 1640 | write$ newline$ 1641 | "\providecommand{\eprint}[2][]{\url{#2}}" 1642 | write$ newline$ 1643 | } 1644 | EXECUTE {begin.bib} 1645 | EXECUTE {init.state.consts} 1646 | ITERATE {call.type$} 1647 | FUNCTION {end.bib} 1648 | { newline$ 1649 | "\end{thebibliography}" write$ newline$ 1650 | } 1651 | EXECUTE {end.bib} 1652 | %% End of customized bst file 1653 | %% 1654 | %% End of file `jss.bst'. 1655 | -------------------------------------------------------------------------------- /jss.cls: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `jss.cls', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% jss.dtx (with options: `class') 8 | %% 9 | %% IMPORTANT NOTICE: 10 | %% 11 | %% For the copyright see the source file. 12 | %% 13 | %% Any modified versions of this file must be renamed 14 | %% with new filenames distinct from jss.cls. 15 | %% 16 | %% For distribution of the original source see the terms 17 | %% for copying and modification in the file jss.dtx. 18 | %% 19 | %% This generated file may be distributed as long as the 20 | %% original source files, as listed above, are part of the 21 | %% same distribution. (The sources need not necessarily be 22 | %% in the same archive or directory.) 23 | \def\fileversion{3.0} 24 | \def\filename{jss} 25 | \def\filedate{2015/09/01} 26 | %% 27 | %% Package `jss' to use with LaTeX2e for JSS publications (http://www.jstatsoft.org/) 28 | %% License: GPL-2 | GPL-3 29 | %% Copyright: (C) Achim Zeileis 30 | %% Please report errors to Achim.Zeileis@R-project.org 31 | %% 32 | \NeedsTeXFormat{LaTeX2e} 33 | \ProvidesClass{jss}[\filedate\space\fileversion\space jss class by Achim Zeileis] 34 | %% options 35 | \newif\if@article 36 | \newif\if@codesnippet 37 | \newif\if@bookreview 38 | \newif\if@softwarereview 39 | \newif\if@review 40 | \newif\if@shortnames 41 | \newif\if@nojss 42 | \newif\if@notitle 43 | \newif\if@noheadings 44 | \newif\if@nofooter 45 | 46 | \@articletrue 47 | \@codesnippetfalse 48 | \@bookreviewfalse 49 | \@softwarereviewfalse 50 | \@reviewfalse 51 | \@shortnamesfalse 52 | \@nojssfalse 53 | \@notitlefalse 54 | \@noheadingsfalse 55 | \@nofooterfalse 56 | 57 | \DeclareOption{article}{\@articletrue% 58 | \@codesnippetfalse \@bookreviewfalse \@softwarereviewfalse} 59 | \DeclareOption{codesnippet}{\@articlefalse% 60 | \@codesnippettrue \@bookreviewfalse \@softwarereviewfalse} 61 | \DeclareOption{bookreview}{\@articlefalse% 62 | \@codesnippetfalse \@bookreviewtrue \@softwarereviewfalse} 63 | \DeclareOption{softwarereview}{\@articlefalse% 64 | \@codesnippetfalse \@bookreviewfalse \@softwarereviewtrue} 65 | \DeclareOption{shortnames}{\@shortnamestrue} 66 | \DeclareOption{nojss}{\@nojsstrue} 67 | \DeclareOption{notitle}{\@notitletrue} 68 | \DeclareOption{noheadings}{\@noheadingstrue} 69 | \DeclareOption{nofooter}{\@nofootertrue} 70 | 71 | \ProcessOptions 72 | \LoadClass[11pt,a4paper,twoside]{article} 73 | %% required packages 74 | \RequirePackage{graphicx,color,ae,fancyvrb} 75 | \RequirePackage[T1]{fontenc} 76 | \IfFileExists{upquote.sty}{\RequirePackage{upquote}}{} 77 | %% bibliography 78 | \if@shortnames 79 | \usepackage[authoryear,round]{natbib} 80 | \else 81 | \usepackage[authoryear,round,longnamesfirst]{natbib} 82 | \fi 83 | \bibpunct{(}{)}{;}{a}{}{,} 84 | \bibliographystyle{jss} 85 | %% page layout 86 | \topmargin 0pt 87 | \textheight 46\baselineskip 88 | \advance\textheight by \topskip 89 | \oddsidemargin 0.1in 90 | \evensidemargin 0.15in 91 | \marginparwidth 1in 92 | \oddsidemargin 0.125in 93 | \evensidemargin 0.125in 94 | \marginparwidth 0.75in 95 | \textwidth 6.125in 96 | %% paragraphs 97 | \setlength{\parskip}{0.7ex plus0.1ex minus0.1ex} 98 | \setlength{\parindent}{0em} 99 | %% for all publications 100 | \newcommand{\Address}[1]{\def\@Address{#1}} 101 | \newcommand{\Plaintitle}[1]{\def\@Plaintitle{#1}} 102 | \newcommand{\Shorttitle}[1]{\def\@Shorttitle{#1}} 103 | \newcommand{\Plainauthor}[1]{\def\@Plainauthor{#1}} 104 | \newcommand{\Volume}[1]{\def\@Volume{#1}} 105 | \newcommand{\Year}[1]{\def\@Year{#1}} 106 | \newcommand{\Month}[1]{\def\@Month{#1}} 107 | \newcommand{\Issue}[1]{\def\@Issue{#1}} 108 | \newcommand{\Submitdate}[1]{\def\@Submitdate{#1}} 109 | %% for articles and code snippets 110 | \newcommand{\Acceptdate}[1]{\def\@Acceptdate{#1}} 111 | \newcommand{\Abstract}[1]{\def\@Abstract{#1}} 112 | \newcommand{\Keywords}[1]{\def\@Keywords{#1}} 113 | \newcommand{\Plainkeywords}[1]{\def\@Plainkeywords{#1}} 114 | %% for book and software reviews 115 | \newcommand{\Reviewer}[1]{\def\@Reviewer{#1}} 116 | \newcommand{\Booktitle}[1]{\def\@Booktitle{#1}} 117 | \newcommand{\Bookauthor}[1]{\def\@Bookauthor{#1}} 118 | \newcommand{\Publisher}[1]{\def\@Publisher{#1}} 119 | \newcommand{\Pubaddress}[1]{\def\@Pubaddress{#1}} 120 | \newcommand{\Pubyear}[1]{\def\@Pubyear{#1}} 121 | \newcommand{\ISBN}[1]{\def\@ISBN{#1}} 122 | \newcommand{\Pages}[1]{\def\@Pages{#1}} 123 | \newcommand{\Price}[1]{\def\@Price{#1}} 124 | \newcommand{\Plainreviewer}[1]{\def\@Plainreviewer{#1}} 125 | \newcommand{\Softwaretitle}[1]{\def\@Softwaretitle{#1}} 126 | \newcommand{\URL}[1]{\def\@URL{#1}} 127 | \newcommand{\DOI}[1]{\def\@DOI{#1}} 128 | %% for internal use 129 | \newcommand{\Seriesname}[1]{\def\@Seriesname{#1}} 130 | \newcommand{\Hypersubject}[1]{\def\@Hypersubject{#1}} 131 | \newcommand{\Hyperauthor}[1]{\def\@Hyperauthor{#1}} 132 | \newcommand{\Footername}[1]{\def\@Footername{#1}} 133 | \newcommand{\Firstdate}[1]{\def\@Firstdate{#1}} 134 | \newcommand{\Seconddate}[1]{\def\@Seconddate{#1}} 135 | \newcommand{\Reviewauthor}[1]{\def\@Reviewauthor{#1}} 136 | %% defaults 137 | \author{Firstname Lastname\\Affiliation} 138 | \title{Title} 139 | \Abstract{---!!!---an abstract is required---!!!---} 140 | \Plainauthor{\@author} 141 | \Volume{VV} 142 | \Year{YYYY} 143 | \Month{MMMMMM} 144 | \Issue{II} 145 | \Submitdate{yyyy-mm-dd} 146 | \Acceptdate{yyyy-mm-dd} 147 | \Address{ 148 | Firstname Lastname\\ 149 | Affiliation\\ 150 | Address, Country\\ 151 | E-mail: \email{name@address}\\ 152 | URL: \url{http://link/to/webpage/} 153 | } 154 | 155 | \Reviewer{Firstname Lastname\\Affiliation} 156 | \Plainreviewer{Firstname Lastname} 157 | \Booktitle{Book Title} 158 | \Bookauthor{Book Author} 159 | \Publisher{Publisher} 160 | \Pubaddress{Publisher's Address} 161 | \Pubyear{YYY} 162 | \ISBN{x-xxxxx-xxx-x} 163 | \Pages{xv + 123} 164 | \Price{USD 69.95 (P)} 165 | \URL{http://link/to/webpage/} 166 | \DOI{10.18637/jss.v000.i00} 167 | \if@article 168 | \Seriesname{Issue} 169 | \Hypersubject{Journal of Statistical Software} 170 | \Plaintitle{\@title} 171 | \Shorttitle{\@title} 172 | \Plainkeywords{\@Keywords} 173 | \fi 174 | 175 | \if@codesnippet 176 | \Seriesname{Code Snippet} 177 | \Hypersubject{Journal of Statistical Software -- Code Snippets} 178 | \Plaintitle{\@title} 179 | \Shorttitle{\@title} 180 | \Plainkeywords{\@Keywords} 181 | \fi 182 | 183 | \if@bookreview 184 | \Seriesname{Book Review} 185 | \Hypersubject{Journal of Statistical Software -- Book Reviews} 186 | \Plaintitle{\@Booktitle} 187 | \Shorttitle{\@Booktitle} 188 | \Reviewauthor{\@Bookauthor\\ 189 | \@Publisher, \@Pubaddress, \@Pubyear.\\ 190 | ISBN~\@ISBN. \@Pages~pp. \@Price.\\ 191 | \url{\@URL}} 192 | \Plainkeywords{} 193 | \@reviewtrue 194 | \fi 195 | 196 | \if@softwarereview 197 | \Seriesname{Software Review} 198 | \Hypersubject{Journal of Statistical Software -- Software Reviews} 199 | \Plaintitle{\@Softwaretitle} 200 | \Shorttitle{\@Softwaretitle} 201 | \Booktitle{\@Softwaretitle} 202 | \Reviewauthor{\@Publisher, \@Pubaddress. \@Price.\\ 203 | \url{\@URL}} 204 | \Plainkeywords{} 205 | \@reviewtrue 206 | \fi 207 | 208 | \if@review 209 | \Hyperauthor{\@Plainreviewer} 210 | \Keywords{} 211 | \Footername{Reviewer} 212 | \Firstdate{\textit{Published:} \@Submitdate} 213 | \Seconddate{} 214 | \else 215 | \Hyperauthor{\@Plainauthor} 216 | \Keywords{---!!!---at least one keyword is required---!!!---} 217 | \Footername{Affiliation} 218 | \Firstdate{\textit{Submitted:} \@Submitdate} 219 | \Seconddate{\textit{Accepted:} \@Acceptdate} 220 | \fi 221 | %% Sweave(-like) 222 | \DefineVerbatimEnvironment{Sinput}{Verbatim}{fontshape=sl} 223 | \DefineVerbatimEnvironment{Soutput}{Verbatim}{} 224 | \DefineVerbatimEnvironment{Scode}{Verbatim}{fontshape=sl} 225 | \newenvironment{Schunk}{}{} 226 | \DefineVerbatimEnvironment{Code}{Verbatim}{} 227 | \DefineVerbatimEnvironment{CodeInput}{Verbatim}{fontshape=sl} 228 | \DefineVerbatimEnvironment{CodeOutput}{Verbatim}{} 229 | \newenvironment{CodeChunk}{}{} 230 | \setkeys{Gin}{width=0.8\textwidth} 231 | %% footer 232 | \newlength{\footerskip} 233 | \setlength{\footerskip}{2.5\baselineskip plus 2ex minus 0.5ex} 234 | 235 | \newcommand{\makefooter}{% 236 | \vspace{\footerskip} 237 | 238 | \if@nojss 239 | \begin{samepage} 240 | \textbf{\large \@Footername: \nopagebreak}\\[.3\baselineskip] \nopagebreak 241 | \@Address \nopagebreak 242 | \end{samepage} 243 | \else 244 | \begin{samepage} 245 | \textbf{\large \@Footername: \nopagebreak}\\[.3\baselineskip] \nopagebreak 246 | \@Address \nopagebreak 247 | \vfill 248 | \hrule \nopagebreak 249 | \vspace{.1\baselineskip} 250 | {\fontfamily{pzc} \fontsize{13}{15} \selectfont Journal of Statistical Software} 251 | \hfill 252 | \url{http://www.jstatsoft.org/}\\ \nopagebreak 253 | published by the Foundation for Open Access Statistics 254 | \hfill 255 | \url{http://www.foastat.org/}\\[.3\baselineskip] \nopagebreak 256 | {\@Month{} \@Year, Volume~\@Volume, \@Seriesname~\@Issue} 257 | \hfill 258 | \@Firstdate\\ \nopagebreak 259 | {\href{https://doi.org/\@DOI}{\tt doi:\@DOI}} 260 | \hfill 261 | \@Seconddate \nopagebreak 262 | \vspace{.3\baselineskip} 263 | \hrule 264 | \end{samepage} 265 | \fi 266 | } 267 | \if@nofooter 268 | %% \AtEndDocument{\makefooter} 269 | \else 270 | \AtEndDocument{\makefooter} 271 | \fi 272 | %% required packages 273 | \RequirePackage{hyperref} 274 | %% new \maketitle 275 | \def\@myoddhead{ 276 | {\color{white} JSS}\\[-1.42cm] 277 | \hspace{-2em} \includegraphics[height=23mm,keepaspectratio]{jsslogo} \hfill 278 | \parbox[b][23mm]{118mm}{\hrule height 3pt 279 | \center{ 280 | {\fontfamily{pzc} \fontsize{28}{32} \selectfont Journal of Statistical Software} 281 | \vfill 282 | {\it \small \@Month{} \@Year, Volume~\@Volume, \@Seriesname~\@Issue.% 283 | \hfill \href{https://doi.org/\@DOI}{doi:\,\@DOI}}}\\[0.1cm] 284 | \hrule height 3pt}} 285 | \if@review 286 | \renewcommand{\maketitle}{ 287 | \if@nojss 288 | %% \@oddhead{\@myoddhead}\\[3\baselineskip] 289 | \else 290 | \@oddhead{\@myoddhead}\\[3\baselineskip] 291 | \fi 292 | {\large 293 | \noindent 294 | Reviewer: \@Reviewer 295 | \vspace{\baselineskip} 296 | \hrule 297 | \vspace{\baselineskip} 298 | \textbf{\@Booktitle} 299 | \begin{quotation} \noindent 300 | \@Reviewauthor 301 | \end{quotation} 302 | \vspace{0.7\baselineskip} 303 | \hrule 304 | \vspace{1.3\baselineskip} 305 | } 306 | 307 | \thispagestyle{empty} 308 | \if@nojss 309 | \markboth{\centerline{\@Shorttitle}}{\centerline{\@Hyperauthor}} 310 | \else 311 | \markboth{\centerline{\@Shorttitle}}{\centerline{\@Hypersubject}} 312 | \fi 313 | \pagestyle{myheadings} 314 | } 315 | \else 316 | \def\maketitle{ 317 | \if@nojss 318 | %% \@oddhead{\@myoddhead} \par 319 | \else 320 | \@oddhead{\@myoddhead} \par 321 | \fi 322 | \begingroup 323 | \def\thefootnote{\fnsymbol{footnote}} 324 | \def\@makefnmark{\hbox to 0pt{$^{\@thefnmark}$\hss}} 325 | \long\def\@makefntext##1{\parindent 1em\noindent 326 | \hbox to1.8em{\hss $\m@th ^{\@thefnmark}$}##1} 327 | \@maketitle \@thanks 328 | \endgroup 329 | \setcounter{footnote}{0} 330 | 331 | \if@noheadings 332 | %% \markboth{\centerline{\@Shorttitle}}{\centerline{\@Hypersubject}} 333 | \else 334 | \thispagestyle{empty} 335 | \if@nojss 336 | \markboth{\centerline{\@Shorttitle}}{\centerline{\@Hyperauthor}} 337 | \else 338 | \markboth{\centerline{\@Shorttitle}}{\centerline{\@Hypersubject}} 339 | \fi 340 | \pagestyle{myheadings} 341 | \fi 342 | 343 | \let\maketitle\relax \let\@maketitle\relax 344 | \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax 345 | } 346 | 347 | \def\@maketitle{\vbox{\hsize\textwidth \linewidth\hsize 348 | \if@nojss 349 | %% \vskip 1in 350 | \else 351 | \vskip 1in 352 | \fi 353 | {\centering 354 | {\LARGE\bf \@title\par} 355 | \vskip 0.2in plus 1fil minus 0.1in 356 | { 357 | \def\and{\unskip\enspace{\rm and}\enspace}% 358 | \def\And{\end{tabular}\hss \egroup \hskip 1in plus 2fil 359 | \hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}\large\bf\rule{\z@}{24pt}\ignorespaces}% 360 | \def\AND{\end{tabular}\hss\egroup \hfil\hfil\egroup 361 | \vskip 0.1in plus 1fil minus 0.05in 362 | \hbox to \linewidth\bgroup\rule{\z@}{10pt} \hfil\hfil 363 | \hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}\large\bf\rule{\z@}{24pt}\ignorespaces} 364 | \hbox to \linewidth\bgroup\rule{\z@}{10pt} \hfil\hfil 365 | \hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}\large\bf\rule{\z@}{24pt}\@author 366 | \end{tabular}\hss\egroup 367 | \hfil\hfil\egroup} 368 | \vskip 0.3in minus 0.1in 369 | \hrule 370 | \begin{abstract} 371 | \@Abstract 372 | \end{abstract}} 373 | \textit{Keywords}:~\@Keywords. 374 | \vskip 0.1in minus 0.05in 375 | \hrule 376 | \vskip 0.2in minus 0.1in 377 | }} 378 | \fi 379 | %% sections, subsections, and subsubsections 380 | \newlength{\preXLskip} 381 | \newlength{\preLskip} 382 | \newlength{\preMskip} 383 | \newlength{\preSskip} 384 | \newlength{\postMskip} 385 | \newlength{\postSskip} 386 | \setlength{\preXLskip}{1.8\baselineskip plus 0.5ex minus 0ex} 387 | \setlength{\preLskip}{1.5\baselineskip plus 0.3ex minus 0ex} 388 | \setlength{\preMskip}{1\baselineskip plus 0.2ex minus 0ex} 389 | \setlength{\preSskip}{.8\baselineskip plus 0.2ex minus 0ex} 390 | \setlength{\postMskip}{.5\baselineskip plus 0ex minus 0.1ex} 391 | \setlength{\postSskip}{.3\baselineskip plus 0ex minus 0.1ex} 392 | 393 | \newcommand{\jsssec}[2][default]{\vskip \preXLskip% 394 | \pdfbookmark[1]{#1}{Section.\thesection.#1}% 395 | \refstepcounter{section}% 396 | \centerline{\textbf{\Large \thesection. #2}} \nopagebreak 397 | \vskip \postMskip \nopagebreak} 398 | \newcommand{\jsssecnn}[1]{\vskip \preXLskip% 399 | \centerline{\textbf{\Large #1}} \nopagebreak 400 | \vskip \postMskip \nopagebreak} 401 | 402 | \newcommand{\jsssubsec}[2][default]{\vskip \preMskip% 403 | \pdfbookmark[2]{#1}{Subsection.\thesubsection.#1}% 404 | \refstepcounter{subsection}% 405 | \textbf{\large \thesubsection. #2} \nopagebreak 406 | \vskip \postSskip \nopagebreak} 407 | \newcommand{\jsssubsecnn}[1]{\vskip \preMskip% 408 | \textbf{\large #1} \nopagebreak 409 | \vskip \postSskip \nopagebreak} 410 | 411 | \newcommand{\jsssubsubsec}[2][default]{\vskip \preSskip% 412 | \pdfbookmark[3]{#1}{Subsubsection.\thesubsubsection.#1}% 413 | \refstepcounter{subsubsection}% 414 | {\large \textit{#2}} \nopagebreak 415 | \vskip \postSskip \nopagebreak} 416 | \newcommand{\jsssubsubsecnn}[1]{\vskip \preSskip% 417 | {\textit{\large #1}} \nopagebreak 418 | \vskip \postSskip \nopagebreak} 419 | 420 | \newcommand{\jsssimplesec}[2][default]{\vskip \preLskip% 421 | %% \pdfbookmark[1]{#1}{Section.\thesection.#1}% 422 | \refstepcounter{section}% 423 | \textbf{\large #1} \nopagebreak 424 | \vskip \postSskip \nopagebreak} 425 | \newcommand{\jsssimplesecnn}[1]{\vskip \preLskip% 426 | \textbf{\large #1} \nopagebreak 427 | \vskip \postSskip \nopagebreak} 428 | 429 | \if@review 430 | \renewcommand{\section}{\secdef \jsssimplesec \jsssimplesecnn} 431 | \renewcommand{\subsection}{\secdef \jsssimplesec \jsssimplesecnn} 432 | \renewcommand{\subsubsection}{\secdef \jsssimplesec \jsssimplesecnn} 433 | \else 434 | \renewcommand{\section}{\secdef \jsssec \jsssecnn} 435 | \renewcommand{\subsection}{\secdef \jsssubsec \jsssubsecnn} 436 | \renewcommand{\subsubsection}{\secdef \jsssubsubsec \jsssubsubsecnn} 437 | \fi 438 | %% colors 439 | \definecolor{Red}{rgb}{0.5,0,0} 440 | \definecolor{Blue}{rgb}{0,0,0.5} 441 | \if@review 442 | \hypersetup{% 443 | hyperindex = {true}, 444 | colorlinks = {true}, 445 | linktocpage = {true}, 446 | plainpages = {false}, 447 | linkcolor = {Blue}, 448 | citecolor = {Blue}, 449 | urlcolor = {Red}, 450 | pdfstartview = {Fit}, 451 | pdfpagemode = {None}, 452 | pdfview = {XYZ null null null} 453 | } 454 | \else 455 | \hypersetup{% 456 | hyperindex = {true}, 457 | colorlinks = {true}, 458 | linktocpage = {true}, 459 | plainpages = {false}, 460 | linkcolor = {Blue}, 461 | citecolor = {Blue}, 462 | urlcolor = {Red}, 463 | pdfstartview = {Fit}, 464 | pdfpagemode = {UseOutlines}, 465 | pdfview = {XYZ null null null} 466 | } 467 | \fi 468 | \if@nojss 469 | \AtBeginDocument{ 470 | \hypersetup{% 471 | pdfauthor = {\@Hyperauthor}, 472 | pdftitle = {\@Plaintitle}, 473 | pdfkeywords = {\@Plainkeywords} 474 | } 475 | } 476 | \else 477 | \AtBeginDocument{ 478 | \hypersetup{% 479 | pdfauthor = {\@Hyperauthor}, 480 | pdftitle = {\@Plaintitle}, 481 | pdfsubject = {\@Hypersubject}, 482 | pdfkeywords = {\@Plainkeywords} 483 | } 484 | } 485 | \fi 486 | \if@notitle 487 | %% \AtBeginDocument{\maketitle} 488 | \else 489 | \AtBeginDocument{\maketitle} 490 | \fi 491 | %% commands 492 | \newcommand\code{\bgroup\@makeother\_\@makeother\~\@makeother\$\@codex} 493 | \def\@codex#1{{\normalfont\ttfamily\hyphenchar\font=-1 #1}\egroup} 494 | %%\let\code=\texttt 495 | \let\proglang=\textsf 496 | \newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}} 497 | \newcommand{\email}[1]{\href{mailto:#1}{\normalfont\texttt{#1}}} 498 | \ifx\csname urlstyle\endcsname\relax 499 | \newcommand\@doi[1]{doi:\discretionary{}{}{}#1}\else 500 | \newcommand\@doi{doi:\discretionary{}{}{}\begingroup 501 | \urlstyle{tt}\Url}\fi 502 | \newcommand{\doi}[1]{\href{https://doi.org/#1}{\normalfont\texttt{\@doi{#1}}}} 503 | \newcommand{\E}{\mathsf{E}} 504 | \newcommand{\VAR}{\mathsf{VAR}} 505 | \newcommand{\COV}{\mathsf{COV}} 506 | \newcommand{\Prob}{\mathsf{P}} 507 | \endinput 508 | %% 509 | %% End of file `jss.cls'. 510 | -------------------------------------------------------------------------------- /jsslogo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paul-buerkner/Bayesian-IRT-paper/423058f30a06e1ba59edf359851b25be89d54ef3/jsslogo.jpg --------------------------------------------------------------------------------