请选择 进入手机版 | 继续访问电脑版
楼主: jiandong4388
4869 11

[程序分享] 【独家发布】IRT的R语言xxIRT包介绍 [推广有奖]

贵宾

一无所有的小博

学科带头人

79%

还不是VIP/贵宾

-

TA的文库  其他...

数据文库

IRT

meta-analysis

威望
1
论坛币
220573 个
通用积分
8540.0309
学术水平
361 点
热心指数
464 点
信用等级
300 点
经验
72064 点
帖子
2257
精华
2
在线时间
1681 小时
注册时间
2013-7-7
最后登录
2024-3-19

jiandong4388 学生认证  发表于 2017-10-31 19:13:07 |显示全部楼层 |坛友微信交流群
相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
如题,下面介绍是R语言刚刚出来不久的IRT包:xxIRT。感兴趣可以下载试试。具体代码如下:


library(xxIRT)
### create a 3pl model using given parameters
theta <- c(-1, 0, 1)
a <- c(.588, 1)
b <- c(-1, 1)
c <- c(0, .2)
u <- matrix(c(1, 0, 1, 0, 1, 0), nrow=3)
people <- data.frame(theta=theta)
items <- data.frame(a=a, b=b, c=c)
# create 3pl model using different arguments
model_3pl(people=people, items=items, responses=u)
model_3pl(people=people, items=items)
model_3pl(theta=theta, a=a, b=b, c=c)
model_3pl(people=people, a=a, b=b, c=c)
model_3pl(theta=theta, items=items)
# compute Probability, Information, Likelihood by calling itself
x <- model_3pl(people=people, items=items, responses=u)
x$P(x)
x$I(x)
x$L(x)
# compute Probability, Information, Likelihood by calling the class object
model_3pl()$P(x)
model_3pl()$I(x)
model_3pl()$L(x)
### create a 3PL model using generated data
x <- model_3pl()$gendata(5, 3)
x$P(x)
x$I(x)
x$L(x)


a 3pl model: 3 people, 2 items, with responses.
snapshot of people:
  theta
1    -1
2     0
3     1
snapshot of items:
      a  b   c
1 0.588 -1 0.0
2 1.000  1 0.2
snapshot of responses:
     [,1] [,2]
[1,]    1    0
[2,]    0    1
[3,]    1    0
> model_3pl(people=people, items=items)
a 3pl model: 3 people, 2 items, without responses.
snapshot of people:
  theta
1    -1
2     0
3     1
snapshot of items:
      a  b   c
1 0.588 -1 0.0
2 1.000  1 0.2
snapshot of responses:
NULL
> model_3pl(theta=theta, a=a, b=b, c=c)
a 3pl model: 3 people, 2 items, without responses.
snapshot of people:
  theta
1    -1
2     0
3     1
snapshot of items:
      a  b   c
1 0.588 -1 0.0
2 1.000  1 0.2
snapshot of responses:
NULL
> model_3pl(people=people, a=a, b=b, c=c)
a 3pl model: 3 people, 2 items, without responses.
snapshot of people:
  theta
1    -1
2     0
3     1
snapshot of items:
      a  b   c
1 0.588 -1 0.0
2 1.000  1 0.2
snapshot of responses:
NULL
> model_3pl(theta=theta, items=items)
a 3pl model: 3 people, 2 items, without responses.
snapshot of people:
  theta
1    -1
2     0
3     1
snapshot of items:
      a  b   c
1 0.588 -1 0.0
2 1.000  1 0.2
snapshot of responses:
NULL
>
> # compute Probability, Information, Likelihood by calling itself
> x <- model_3pl(people=people, items=items, responses=u)
> x$P(x)
        item.1    item.2
[1,] 0.5000000 0.2258364
[2,] 0.7309799 0.3235722
[3,] 0.8807131 0.6000000
> x$I(x)
        item.1     item.2
[1,] 0.2498000 0.01033284
[2,] 0.1964910 0.14414837
[3,] 0.1049735 0.48166667
> x$L(x)
        item.1    item.2
[1,] 0.5000000 0.7741636
[2,] 0.2690201 0.3235722
[3,] 0.8807131 0.4000000
>
> # compute Probability, Information, Likelihood by calling the class object
> model_3pl()$P(x)
        item.1    item.2
[1,] 0.5000000 0.2258364
[2,] 0.7309799 0.3235722
[3,] 0.8807131 0.6000000
> model_3pl()$I(x)
        item.1     item.2
[1,] 0.2498000 0.01033284
[2,] 0.1964910 0.14414837
[3,] 0.1049735 0.48166667
> model_3pl()$L(x)
        item.1    item.2
[1,] 0.5000000 0.7741636
[2,] 0.2690201 0.3235722
[3,] 0.8807131 0.4000000
>
> ### create a 3PL model using generated data
> x <- model_3pl()$gendata(5, 3)
> x$P(x)
        item.1     item.2    item.3
[1,] 0.6314424 0.09929907 0.2820528
[2,] 0.8781537 0.17149607 0.5999434
[3,] 0.9289669 0.25990548 0.7315110
[4,] 0.7487130 0.11331046 0.3909783
[5,] 0.8298876 0.13799996 0.5058170
> x$I(x)
        item.1      item.2    item.3
[1,] 0.5255876 0.007305597 0.3283107
[2,] 0.2704684 0.203111414 0.5943207
[3,] 0.1693673 0.505613136 0.5164087
[4,] 0.4528021 0.030729564 0.4877337
[5,] 0.3510574 0.094624243 0.5805796
> x$L(x)
        item.1    item.2    item.3
[1,] 0.6314424 0.9007009 0.2820528
[2,] 0.8781537 0.8285039 0.4000566
[3,] 0.9289669 0.7400945 0.7315110
[4,] 0.7487130 0.8866895 0.6090217
[5,] 0.8298876 0.8620000 0.5058170








x$L(x)x$I(x)x$P(x)x <- model_3pl()$gendata(5, 3)### create a 3PL model using generated datamodel_3pl()$L(x)model_3pl()$I(x)model_3pl()$P(x)# compute Probability, Information, Likelihood by calling the class objectx$L(x)x$I(x)x$P(x)x <- model_3pl(people=people, items=items, responses=u)# compute Probability, Information, Likelihood by calling itselfmodel_3pl(theta=theta, items=items) model_3pl(people=people, a=a, b=b, c=c) model_3pl(theta=theta, a=a, b=b, c=c) model_3pl(people=people, items=items) model_3pl(people=people, items=items, responses=u) # create 3pl model using different argumentsitems <- data.frame(a=a, b=b, c=c)people <- data.frame(theta=theta)u <- matrix(c(1, 0, 1, 0, 1, 0), nrow=3)c <- c(0, .2)b <- c(-1, 1)a <- c(.588, 1)theta <- c(-1, 0, 1)### create a 3pl model using given parameterslibrary(xxIRT)
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝


xxIRT_2.0.3.zip

88.34 KB

xxIRT.pdf

102.86 KB

已有 1 人评分经验 学术水平 热心指数 信用等级 收起 理由
Jealy + 100 + 1 + 1 + 1 奖励积极上传好的资料

总评分: 经验 + 100  学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

本帖被以下文库推荐

  • · IRT|主题: 107, 订阅: 74
喜欢经济学,行为学,投资学,行为学,心理学,and 编程
西门高 发表于 2017-10-31 19:21:18 来自手机 |显示全部楼层 |坛友微信交流群
jiandong4388 发表于 2017-10-31 19:13
如题,下面介绍是R语言刚刚出来不久的IRT包:xxIRT。感兴趣可以下载试试。具体代码如下:


谢谢分享

使用道具

书海溪流 发表于 2017-11-1 07:48:52 |显示全部楼层 |坛友微信交流群
多谢无私分享。

使用道具

Jealy 在职认证  发表于 2017-11-1 17:20:24 |显示全部楼层 |坛友微信交流群

使用道具

145xyz 发表于 2017-11-3 09:32:18 |显示全部楼层 |坛友微信交流群
包名 就叫xxIRT吗

使用道具

jiandong4388 学生认证  发表于 2017-11-3 09:39:32 来自手机 |显示全部楼层 |坛友微信交流群
145xyz 发表于 2017-11-3 09:32
包名 就叫xxIRT吗
是的。。

使用道具

jiandong4388 学生认证  发表于 2017-11-3 09:39:48 来自手机 |显示全部楼层 |坛友微信交流群
书海溪流 发表于 2017-11-1 07:48
多谢无私分享。
一起学习

使用道具

jiandong4388 学生认证  发表于 2017-11-3 09:40:42 来自手机 |显示全部楼层 |坛友微信交流群
Jealy 发表于 2017-11-1 17:20
哈哈哈哈

使用道具

书海溪流 发表于 2017-11-3 09:43:24 |显示全部楼层 |坛友微信交流群
jiandong4388 发表于 2017-11-3 09:40
哈哈哈哈
一直在关注你发的IRT资料,不知是否还有关于认知诊断的资料也可以分享一下?非常感谢!

使用道具

145xyz 发表于 2017-11-3 09:46:09 |显示全部楼层 |坛友微信交流群
jiandong4388 发表于 2017-11-3 09:39
是的。。
The Basics of Item Response Theory Using R 这本书有么

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-3-29 16:43