gpcm: Graded Item Response Model, Generalized Percial Credit Model

Description Usage Arguments Examples

View source: R/gpcm.R

Description

Graded Item Response Model, Generalized Percial Credit Model

Usage

1
gpcm(theta, a, b, D, k)

Arguments

theta

the person ability parameter

a

the slope parameter

b

a vector of transition parameter.

D

a scale constant

k

a number of category.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
tp <- c(-1.5, 0, 1)
ggplot2::ggplot(data = data.frame(x=c(-4:4)),
               ggplot2::aes(x=x))+
 ggplot2::stat_function(fun=gpcm,
   args = list(a=1.5, b=tp, D=1.702, k=0),
   ggplot2::aes(colour="category0"))+
 ggplot2::stat_function(fun=gpcm,
   args = list(a=1.5, b=tp, D=1.702, k=1),
   ggplot2::aes(colour="category1"))+
 ggplot2::stat_function(fun=gpcm,
   args = list(a=1.5, b=tp, D=1.702, k=2),
   ggplot2::aes(colour="category2"))+
 ggplot2::stat_function(fun=gpcm,
   args = list(a=1.5, b=tp, D=1.702, k=3),
   ggplot2::aes(colour="category3"))+
 ggplot2::labs(x=latex2exp::TeX("$\\theta$"),
               y=latex2exp::TeX("$P(\\theta)$"),
               colour="Category")

takuizum/irtfun2 documentation built on May 10, 2020, 8:30 a.m.