need help in finding value of discrimination
This is for how to teach statistics and/or R. It is not for how to do analyses. There may be some IRT sources on the internet. You should search for them.
On Fri, Jun 28, 2019 at 1:47 AM hello <snehalikhakse302 at gmail.com> wrote:
Hello Sir/ma?am
I am snehali, doing IRT analysis for 2pl model.
1)I have data of 38 students with 40 questions.
2)I find value of theta(ability) of student
Formula = ln(total_count/(1-total_count))
At student level
3)difficulty of questions (item difficulty)
Formula = ln(total_count/(1-total_count))
4)Find probability of Item difficulty by using following code
function (items)
{
ncases <- nrow(items)
item.mean <- colMeans(items, na.rm = TRUE)
item.mean[item.mean < (1/ncases)] <- 1/ncases
irt.item.diff.rasch <- log((1/item.mean) - 1)
}
5)Now need to find item discrimination ,this is code from package psych
and not understand value of x,diff,item.diff,theta,scores
function (item.diff, theta, items)
{
irt.item.discrim <- function(x, diff, theta, scores) {
fit <- -1 * (log(scores/(1 + exp(x * (diff -
theta))) +
(1 - scores)/(1 + exp(x * (theta
- diff)))))
mean(fit, na.rm = TRUE)
}
nitems <- length(item.diff)
discrim <- matrix(NaN, nitems, 2)
for (i in 1:nitems) {
item.fit <- optimize(irt.item.discrim, c(-5,
5), diff = item.diff[i],
theta = theta, scores = items[,
i])
discrim[i, 1] <- item.fit$minimum
discrim[i, 2] <- item.fit$objective
}
irt.discrim <- discrim
}
Your reply is very important it will be great help for me
I?m protected online with Avast Free Antivirus. Get it here ? it?s free
forever.
Sent from Mail for Windows 10
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
[[alternative HTML version deleted]]
_______________________________________________ R-sig-teaching at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-teaching