Hello ,
I have dichotomous 2 PL IRT model and its output. I want to get those outputs as an excel file i tried xlsx and even stargazer. However, i have a certain problem to get those results in a data.frame function if you would help i would be really appriciated.
Here is the codes in case you need to check:
install.packages("mvtnorm")
install.packages("msm")
install.packages('mirt')
install.packages("ltm")
install.packages("psych")
library(ltm)
library(mirt)
library(psych)
datapasta::df_paste(head(IRT, 6)[, c('item1', 'item2' ,'item3','item4', 'item5b', 'item6b')])
data.frame(
item1 = c(0, 1, 1,0, 1, 1),
item2 = c(0, 1, 1,1, 1, 1),
item3 = c(0, 1, 1,0, 0, 1),
item4 = c(0, 1, 0,0, 1, 1),
item5b = c(1, 1, 1,0, 1, 0),
item6b = c(1, 0, 1,0, 1, 1),
)
Eldor <- na.omit(read.csv2('/Users/arinon/Desktop/Eldor veriler/Eldor2.csv'))
head(Eldor)
#Model and Fit
IRTmodel = ltm(Eldor ~ z1,IRT.param = TRUE)
summ <- summary(IRTmodel)
coef(IRTmodel)
item.fit(IRTmodel)
#Cronbach's alpha values
alpha(Eldor)
#Plots
plot(IRTmodel, type = 'ICC')
#Factor scores of the latent trait
factor.scores(IRTmodel)