File: test_info.R

package info (click to toggle)
r-cran-erm 1.0-6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,952 kB
  • sloc: f90: 401; ansic: 103; makefile: 8
file content (18 lines) | stat: -rwxr-xr-x 654 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
test_info <- function(ermobject,theta=seq(-5,5,0.01))
##Calculates info of a scale of items
#
#@input: ermobject ... Object of class eRm
#        theta ... supporting or sampling points on latent trait
#@output: a list where each element corresponds to an item and contains
#         $c.info...matrix of category information in columns for theta (rows)  
#         $i.info...vector of item information at values of theta
#@author: Thomas Rusch
#@date:12.6.2011
#  
  {
   infos <- item_info(ermobject,theta)
   tmp <- lapply(infos, function(x) x$i.info)
   tmp <- matrix(unlist(tmp),ncol=dim(ermobject$X)[2])
   tinfo <- rowSums(tmp)
   return(tinfo)
 }