Help scoring a matrix of item responses

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Help scoring a matrix of item responses

Rick DeShon
Hi All.

I'm new to R and trying to learn the data manipulation routines.  At the
moment, this is the one that has me stumped.

Imagine n test takers provide responses to k multiple choice items.  The
result is a (n+1) x k matrix of responses where the first row of the matrix
is a correct answer key.

How could you transform the raw item responses into 1s (correct response)
and 0s (incorrect responses) by comparing each test takers response to the
correct answer key?

Any direction would be appreciated!

Rick




--
Rick DeShon
306 Psychology Building
Department of Psychology
Michigan State University
East Lansing, MI 48824-1116

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Fwd: Help scoring a matrix of item responses

Rick DeShon
Hi All.

I'm new to R and trying to learn the data manipulation routines.  At the
moment, this is the one that has me stumped.

Imagine n test takers provide responses to k multiple choice items.  The
result is a (n+1) x k matrix of responses where the first row of the matrix
is a correct answer key.

How could you transform the raw item responses into 1s (correct response)
and 0s (incorrect responses) by comparing each test takers response to the
correct answer key?

Any direction would be appreciated!

Rick

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Help scoring a matrix of item responses

Gabor Grothendieck
Assuming this test data:

iris2 <- round(iris[1:10, 1:4])

Try this:

t(t(iris2) == c(iris2[1,])) + 0

On 2/13/06, Rick DeShon <[hidden email]> wrote:

> Hi All.
>
> I'm new to R and trying to learn the data manipulation routines.  At the
> moment, this is the one that has me stumped.
>
> Imagine n test takers provide responses to k multiple choice items.  The
> result is a (n+1) x k matrix of responses where the first row of the matrix
> is a correct answer key.
>
> How could you transform the raw item responses into 1s (correct response)
> and 0s (incorrect responses) by comparing each test takers response to the
> correct answer key?
>
> Any direction would be appreciated!
>
> Rick
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html