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

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/BilogData.R View source: R/Bilog.Data.R

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

1
2
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.

Details

None.

Value

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

Note

None

Author(s)

A. Alexander Beaujean

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#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")

Example output

sh: 1: rm: Permission denied
000001101
000002011
000003101
000004110
000005011
000006100
000007001
000008000
000009101
000010010
000011111
000012010
000013001
000014001
000015101
000016100
000017101
000018111
000019000
000020001
000021000
000022010
000023011
000024010
000025001
000026001
000027110
000028011
000029011
000030000
000031101
000032111
000033110
000034110
000035000
000036001
000037000
000038101
000039101
000040101
000041101
000042101
000043011
000044001
000045011
000046000
000047011
000048101
000049111
000050010
000051101
000052111
000053010
000054010
000055011
000056110
000057110
000058101
000059100
000060010
000061100
000062110
000063111
000064001
000065010
000066001
000067010
000068110
000069100
000070110
000071011
000072010
000073001
000074100
000075101
000076011
000077101
000078110
000079100
000080000
000081000
000082001
000083011
000084111
000085101
000086110
000087111
000088100
000089001
000090101
000091001
000092001
000093011
000094011
000095011
000096001
000097111
000098110
000099110
000100000

BaylorEdPsych documentation built on May 1, 2019, 8:21 p.m.