Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

read.resp

Read responses from a file


Description

Reads responses to a questionnaire from a text file

Usage

read.resp(file, na = ".")

Arguments

file

File name

na

The symbol used to represent missing data

Details

Included for those who are too faint-hearted to write as.matrix(read.table(file, head=F)). Of course, data can be entered into R in many other ways.

The data values in the file must be separated with blanks.

Responses are the empirical data used in IRT. Note that irtoys deals with models for dichotomous data, and typically expects data consisting of zeroes and ones, without any missing values (non-responses are considered as wrong responses). In fact, there are only two commands in irtoys that accept other kinds of data: sco and tgf.

read.resp does accept missing data and values other than 0 and 1. Use sco and a key to score multiple choice responses to 0/1. If you have dichotomous data that contains NAs, you can use sco without a key to change all NA to 0.

Value

A matrix, typically of zeroes and ones, representing the correct or wrong responses given by persons (rows) to items (columns).

Author(s)

Ivailo Partchev

See Also

sco, tgf,

Examples

## Not run: 
  r <- read.resp("c:/myfiles/irt.dat")

## End(Not run)

irtoys

A Collection of Functions Related to Item Response Theory (IRT)

v0.2.1
GPL (>= 2)
Authors
Ivailo Partchev [aut, cre], Gunter Maris [aut], Tamaki Hattori [ctb]
Initial release
2017-12-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.