Learn R Programming

BaylorEdPsych (version 0.5)

BilogData: Create Fixed Width Data File for use with BILOG-MG

Description

Coverts a R data frame to a fixed width data frame for use in BILOG-MG and exports it to a .dat file. Similar to what the the est function in the irtoys package does, but allows for the use of your own ID variable instead of creading one.

Usage

BilogData(resp, data.name="mydata", location=NULL, ret.val=FALSE, idvar=NULL)

Arguments

resp
A data frame consisting of item responses and possilby an identification varaible
data.name
Name of the exported .dat file.
location
Where the created .dat file will be stored. Defaults to current working directory.
ret.val
If want the .dat to be printed on screen. Logical. Defaults to not priting on screen
idvar
If an ID variable is included in the resp data frame, give the name (e.g., idvar="ID"). Otherwise, a ID variable will be generated. ID variable can be up to 6 numeric characters in length.

Value

None. If ret.val=TRUE the exported .dat file will be printed on screen.

Details

None.

References

Zimowski, M., Muraki, E., Mislevy, R. J., & Bock, R. D. (1996). BILOG-MG 3: Item analysis and test scoring with binary logistic models. [Computer software]. Chicago, IL: Scientific Software International.

du Toit, M. (2003). IRT from SSI. Chicago: Scientific Software International.

Partchev, I. (2012). irtoys: Simple interface to the estimation and plotting of IRT models (version 0.1.5). Flanders, Belgium: KU Leuven. Retrieved from http://cran.r-project.org/web/packages/irtoys/irtoys.pdf

See Also

irtoys-package

Examples

Run this code
#Simulate dichotomous data with ID	
datt<-cbind(rnorm(100), rnorm(100), rnorm(100))
d.datt<-dim(datt)
datt<-as.numeric(datt > 0)
dim(datt)<-d.datt
datt<-data.frame(ID=seq(1,100), datt)

#Export \emph{mydata.dat} file to working directory 
BilogData(datt, idvar="ID")

#Print the exported data frame, \emph{Test5.dat}, on screen, too
BilogData(datt, data.name = "Test5", ret.val=TRUE, idvar="ID")

Run the code above in your browser using DataLab