R Under development (unstable) (2024-09-25 r87194 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(FedIRT) > library(testthat) > test_that('test 1PL', { + + inputdata1 = list(as.matrix(example_data_2PL)) + fedresult1 = fedirt(inputdata1, model_name = "1PL") + + inputdata2 = list(as.matrix(example_data_2PL_1), as.matrix(example_data_2PL_2)) + fedresult2 = fedirt(inputdata2, model_name = "1PL") + + expect_equal(fedresult1[['a']],fedresult2[['a']]) + expect_equal(fedresult1[['b']],fedresult2[['b']]) + expect_equal(fedresult1[['loglik']],fedresult2[['loglik']]) + + expect_equal(fedresult1[['a']], c(1,1,1,1,1,1,1,1,1,1),tolerance = 1e-2) + expect_equal(fedresult1[['b']],c(-0.95588779, -1.24097452, -0.59950125, -0.44607217, -1.88997545, -1.27879273 ,-1.16695639 ,-0.75761610, -0.11846449,-0.08904234),tolerance = 1e-2) + expect_equal(fedresult1[['loglik']],-957, tolerance = 1e-2) + + }) Test passed 🥳 > > proc.time() user system elapsed 4.03 0.50 4.48