Git Product home page Git Product logo

Comments (5)

adelahladka avatar adelahladka commented on May 20, 2024

Přikládám možnou úpravu pomocí mirt balíčku, která celou záložku IRT models výrazně zrychlí. mirt poskytuje podobné obrázky jako ltm, navíc má však dobře naprogramované (rychlé a obecné) funkce k vyhodnocení modelů atd. - viz zdroják

library(difNLR)
library(mirt)
data(GMAT)
data <- GMAT[, 1:20]

### IRT models
###### Rasch model model = 1, itemtype = "Rasch", constrain = NULL
###### 1PL with the fixed discrimination
###### model <- 'F = 1-20
###### CONSTRAIN = (1-20, a1)'
###### nebo
###### model = 1, itemtype = "2PL", constrain = list((1:ncol(data)) + seq(0, (ncol(data) - 1)*3, 3))
###### 2PL model = 1, itemtype = "2PL", constrain = NULL
###### 3PL model = 1, itemtype = "3PL", constrain = NULL
fitR <- mirt(data, model, itemtype = itemtype, constrain = constrain)

# COEF
coef(fitR)

# PLOTS
# expected total score
plot(fitR, type = "score")

# test information function
plot(fitR, type = "info")

# reliability
plot(fitR, type = "rxx")

# test standard errors
plot(fitR, type = "SE")

# item trace lines - characteristic curves multiple figure
plot(fitR, type = "trace")
plot(fitR, type = "trace", facet_items = F)

# item information trace lines - multiple figure
plot(fitR, type = "infotrace")
plot(fitR, type = "infotrace", facet_items = F)

# expected item scoring function - multiple figure
plot(fitR, type = "itemscore")
plot(fitR, type = "itemscore", facet_items = F)

# test information and standard errors - combination
plot(fitR, type = "infoSE")

# factor scores
fs <- fscores(fitR)
sts <- as.vector(scale(apply(data, 1, sum)))

df <- data.frame(fs, sts)

ggplot(df, aes_string("sts", "fs")) +
geom_point(size = 3) +
labs(x = "Standardized total score", y = "Factor score") +
theme_bw() +
theme(text = element_text(size = 14),
plot.title = element_text(face = "bold", vjust = 1.5),
axis.line = element_line(colour = "black"),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.background = element_blank()) +
theme(legend.box.just = "left",
legend.justification = c(1, 0),
legend.position = c(1, 0),
legend.box = "vertical",
legend.key.size = unit(1, "lines"),
legend.text.align = 0,
legend.title.align = 0)

### comparing two models
fit1 <- mirt(data, 1, "Rasch")
fit2 <- mirt(data, 1, "2PL")
anova(fit1, fit2)

### person fit
personfit(fitR)

`

from shinyitemanalysis.

patriciamar avatar patriciamar commented on May 20, 2024

mirt vypada velmi dobre! Bylo by mozne vytvorit jej zatim jako samostatny list?

from shinyitemanalysis.

adelahladka avatar adelahladka commented on May 20, 2024
  • mirt přidán jako samostatný list
  • models comparison přidáno jako další záložka v IRT models

Co je ještě potřeba?

from shinyitemanalysis.

patriciamar avatar patriciamar commented on May 20, 2024

mirt vypada pekne.

Zatim nam zlobi pridani baliku mirt na Shiny server. Nejake napady? Hlasi to toto:

  • installing source package ‘RcppArmadillo’ ...
    ** package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked
    checking whether the C++ compiler works... yes
    checking for C++ compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C++ compiler... yes
    checking whether g++ -m64 accepts -g... yes
    checking how to run the C++ preprocessor... g++ -m64 -E
    checking whether we are using the GNU C++ compiler... (cached) yes
    checking whether g++ -m64 accepts -g... (cached) yes
    checking whether g++ version is sufficient... no
    configure: WARNING: Only g++ version 4.6 or greater can be used with RcppArmadillo.
    configure: error: Please use a different compiler.
    ERROR: configuration failed for package ‘RcppArmadillo’
  • removing ‘/usr/lib64/R/library/RcppArmadillo’
    ERROR: dependency ‘RcppArmadillo’ is not available for package ‘mirt’

Kompiler prý nemá update.

from shinyitemanalysis.

adelahladka avatar adelahladka commented on May 20, 2024

U mě to funguje bez problémů, zde radí spustit R v režimu R --vanilla a pak až nainstalovat balíčky.

Teď jsem ještě našla debatu vývojářů přímo na GitHubu. Snad to pomůže!

from shinyitemanalysis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.