Title: | Estimating IRT Parameters via Machine Learning Algorithms |
---|---|
Description: | A tool to estimate IRT item parameters (2 PL) using CTT-based item statistics from small samples via artificial neural networks and regression trees. |
Authors: | Eda Akdogdu Yildiz [aut, cre] , Huseyin Yıldız [aut] , Kubra Atalay Kabasakal [aut] |
Maintainer: | Eda Akdogdu Yildiz <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.1 |
Built: | 2024-11-11 07:20:33 UTC |
Source: | CRAN |
This function can be used to estimate IRT item parameters (2 PL) using CTT-based item statistics from small samples via artificial neural networks.
conv.ann(small.data, train.data, model="2PL",layers=1,learningrate=NULL,treshold=0.01)
conv.ann(small.data, train.data, model="2PL",layers=1,learningrate=NULL,treshold=0.01)
small.data |
matrix or data frame: contains small sample dichotomous participant response matrix. |
train.data |
matrix or data frame: contains a dichotomous response matrix to use training of ANN model. This matrix should be contain as much as possible participants for more accurate estimations.The "gen.data" function can be used to obtain a simulative response matrix. |
model |
string: option for desired IRT model. 'Rasch' or '2PL' ('2PL' is default) |
layers |
vector: a vector of integers specifying the number of hidden neurons (vertices) in each layer. |
learningrate |
numeric: a numeric value specifying the learning rate. |
treshold |
numeric: a numeric value specifying the threshold for the partial derivatives of the error function as stopping criteria. |
This function returns a list
including following:
a matrix: Predicted IRT Parameters
a matrix: Item Parameters of Training Data
## Genarating item and ability parameters (1000 participants, 100 items) a <- rlnorm(100,0,0.3) b <- rnorm(100,0,1) responses <- matrix(NA, nrow=1000, ncol=100) theta <- rnorm(1000, 0,1) ### Defining Response Function (2 PL) pij <- function(a,b,theta) { 1/(1+exp(-1*a*(theta-b))) } ### Creating Response Matrix and column names. for( i in 1:1000 ) { for( j in 1:100 ) { responses[i,j]<-ifelse(pij(a=a[j], b=b[j], theta[i]) < runif(1) , 0 ,1) } } names<-paste("i",1:ncol(responses),sep = "_") colnames(responses)<-names train<-as.data.frame(responses) small.index<-sample(1:nrow(train),100,replace=FALSE) small<-train[small.index,] ### Conducting Function conv.ann(small.data=small, train.data=train, model="2PL",layers=c(2,2), learningrate=NULL,treshold=0.01)
## Genarating item and ability parameters (1000 participants, 100 items) a <- rlnorm(100,0,0.3) b <- rnorm(100,0,1) responses <- matrix(NA, nrow=1000, ncol=100) theta <- rnorm(1000, 0,1) ### Defining Response Function (2 PL) pij <- function(a,b,theta) { 1/(1+exp(-1*a*(theta-b))) } ### Creating Response Matrix and column names. for( i in 1:1000 ) { for( j in 1:100 ) { responses[i,j]<-ifelse(pij(a=a[j], b=b[j], theta[i]) < runif(1) , 0 ,1) } } names<-paste("i",1:ncol(responses),sep = "_") colnames(responses)<-names train<-as.data.frame(responses) small.index<-sample(1:nrow(train),100,replace=FALSE) small<-train[small.index,] ### Conducting Function conv.ann(small.data=small, train.data=train, model="2PL",layers=c(2,2), learningrate=NULL,treshold=0.01)
This function can be used to estimate IRT item parameters (2 PL) using CTT-based item statistics from small samples via Regression Trees.
conv.rt(small.data, train.data, model="2PL",pruned=TRUE,min.inst=10)
conv.rt(small.data, train.data, model="2PL",pruned=TRUE,min.inst=10)
small.data |
matrix or data frame: contains small sample dichotomous participant response matrix. |
train.data |
matrix or data frame: contains a dichotomous response matrix to use training of ANN model. This matrix should be contain as much as possible participants for more accurate estimations.The "gen.data" function can be used to obtain a simulative response matrix. |
model |
string: option for desired IRT model. 'Rasch' or '2PL' ('2PL' is default) |
pruned |
a logical: Use unpruned tree/rules. Default is TRUE |
min.inst |
numeric: Minimum number of items per leaf (Default 10). |
This function returns a list
including following:
a matrix: Predicted IRT Parameters
a matrix: Item Parameters of Training Data
a list: Tree Models and Regression Equations
## Genarating item and ability parameters (1000 participants, 100 items) a <- rlnorm(100,0,0.3) b <- rnorm(100,0,1) responses <- matrix(NA, nrow=1000, ncol=100) theta <- rnorm(1000, 0,1) ### Defining Response Function (2 PL) pij <- function(a,b,theta) { 1/(1+exp(-1*a*(theta-b))) } ### Creating Response Matrix and column names. for( i in 1:1000 ) { for( j in 1:100 ) { responses[i,j]<-ifelse(pij(a=a[j], b=b[j], theta[i]) < runif(1) , 0 ,1) } } names<-paste("i",1:ncol(responses),sep = "_") colnames(responses)<-names train<-as.data.frame(responses) small.index<-sample(1:nrow(train),100,replace=FALSE) small<-train[small.index,] ### Conducting Function conv.rt(small.data=small, train.data=train, model="2PL", pruned=TRUE, min.inst=10)
## Genarating item and ability parameters (1000 participants, 100 items) a <- rlnorm(100,0,0.3) b <- rnorm(100,0,1) responses <- matrix(NA, nrow=1000, ncol=100) theta <- rnorm(1000, 0,1) ### Defining Response Function (2 PL) pij <- function(a,b,theta) { 1/(1+exp(-1*a*(theta-b))) } ### Creating Response Matrix and column names. for( i in 1:1000 ) { for( j in 1:100 ) { responses[i,j]<-ifelse(pij(a=a[j], b=b[j], theta[i]) < runif(1) , 0 ,1) } } names<-paste("i",1:ncol(responses),sep = "_") colnames(responses)<-names train<-as.data.frame(responses) small.index<-sample(1:nrow(train),100,replace=FALSE) small<-train[small.index,] ### Conducting Function conv.rt(small.data=small, train.data=train, model="2PL", pruned=TRUE, min.inst=10)
This function can be used for generating dichotomous response matrices based on Logistic IRT Models. Sample size, item number, parameter distributions can be specified.
gen.data(model="2PL",samplesize=1000,itemsize=100, theta.mean=0,theta.sd=1, a.mean=0, a.sd=0.2,b.mean=0, b.sd=1, c.min=0, c.max=0.25)
gen.data(model="2PL",samplesize=1000,itemsize=100, theta.mean=0,theta.sd=1, a.mean=0, a.sd=0.2,b.mean=0, b.sd=1, c.min=0, c.max=0.25)
model |
string: option for desired IRT model. 'Rasch', '2PL' or '3PL' ('2PL' is default) |
samplesize |
numeric: Desired Sample size (Default 1000). |
itemsize |
numeric: Desired item number (Default 100). |
theta.mean |
numeric: mean value of theta normal distribution (Default 0). |
theta.sd |
numeric: standart deviation of theta normal distribution (Default 1). |
a.mean |
numeric: mean value of a parameters log normal distribution (Default 0). |
a.sd |
numeric: standart deviation of a parameters log normal distribution (Default 0.2). |
b.mean |
numeric: mean value of b parameters normal distribution (Default 0). |
b.sd |
numeric: standart deviation of b parameters normal distribution (Default 1). |
c.min |
numeric: minimum value of c parameters uniform distribution (Default 0). |
c.max |
numeric: maximum value of c parameters uniform distribution (Default 0.25). |
This function returns a a data frame
containing simulated dichotomous response matrix.
gen.data(model="2PL", samplesize=1000, itemsize=100, theta.mean=0, theta.sd=1, a.mean=0, a.sd=0.2, b.mean=0, b.sd=1, c.min=0, c.max=0.25)
gen.data(model="2PL", samplesize=1000, itemsize=100, theta.mean=0, theta.sd=1, a.mean=0, a.sd=0.2, b.mean=0, b.sd=1, c.min=0, c.max=0.25)