ltm: Latent Trait Models under IRT
- CRAN: http://cran.r-project.org/web/packages/ltm/index.html
- URL: http://rwiki.sciviews.org/doku.php?id=packages:cran:ltm
> library(ltm)
Loading required package: msm
Loading required package: polycor
Loading required package: mvtnorm
Loading required package: sfsmisc
Attaching package: 'sfsmisc'
The following object is masked from 'package:lme4':
factorize
バージョン: 1.0.0
関数名 | 概略 |
---|---|
Abortion |
Attitude Towards Abortion |
Environment |
Attitude to the Environment |
GoF.gpcm |
Goodness of Fit for Rasch Models |
LSAT |
The Law School Admission Test (LSAT), Section VI |
Mobility |
Women's Mobility |
Science |
Attitude to Science and Technology |
WIRS |
Workplace Industrial Relation Survey Data |
anova.gpcm |
Anova method for fitted IRT models |
biserial.cor |
Point-Biserial Correlation |
coef.gpcm |
Extract Estimated Loadings |
cronbach.alpha |
Cronbach's alpha |
descript |
Descriptive Statistics |
factor.scores |
Factor Scores - Ability Estimates |
fitted.gpcm |
Fitted Values for IRT model |
gh |
Gauss-Hermite Quadrature Points |
gpcm |
Generalized Partial Credit Model - Polytomous IRT |
grm |
Graded Response Model - Polytomous IRT |
information |
Area under the Test or Item Information Curves |
item.fit |
Item-Fit Statistics and P-values |
ltm |
Latent Trait Model - Latent Variable Model for Binary Data |
ltm-package |
Latent Trait Models for Item Response Theory Analyses |
margins |
Fit of the model on the margins |
mult.choice |
Multiple Choice Items to Binary Responses |
person.fit |
Person-Fit Statistics and P-values |
plot.descript |
Descriptive Statistics Plot method |
plot.fscores |
Factor Scores - Ability Estimates Plot method |
plot.gpcm |
Plot method for fitted IRT models rasch Rasch Model |
rcor.test |
Pairwise Associations between Items using a Correlation Coefficient |
residuals.gpcm |
Residuals for IRT models |
rmvlogis |
Generate Random Responses Patterns under Dichotomous and Polytomous IRT models |
summary.gpcm |
Summary method for fitted IRT models |
testEquatingData |
Prepares Data for Test Equating |
tpm |
Birnbaum's Three Parameter Model |
unidimTest |
Unidimensionality Check using Modified Parallel Analysis |
vcov.gpcm |
vcov method for fitted IRT models |
Abortion
> Abortion %>% {
+ print(class(.))
+ dplyr::glimpse(.)
+ }
[1] "data.frame"
Observations: 379
Variables: 4
$ Item 1 (int) 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
$ Item 2 (int) 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
$ Item 3 (int) 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
$ Item 4 (int) 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Environment
> Environment %>% {
+ class(.) %>% print(.)
+ dplyr::tbl_df(.)
+ }
[1] "data.frame"
Source: local data frame [291 x 6]
LeadPetrol RiverSea RadioWaste AirPollution
(fctr) (fctr) (fctr) (fctr)
1 very concerned very concerned very concerned very concerned
2 very concerned very concerned very concerned very concerned
3 very concerned very concerned very concerned very concerned
4 very concerned very concerned very concerned very concerned
5 very concerned very concerned very concerned very concerned
6 very concerned very concerned very concerned very concerned
7 very concerned very concerned very concerned very concerned
8 very concerned very concerned very concerned very concerned
9 very concerned very concerned very concerned very concerned
10 very concerned very concerned very concerned very concerned
.. ... ... ... ...
Variables not shown: Chemicals (fctr), Nuclear (fctr)
LSAT
> LSAT %>% {
+ class(.) %>% print(.)
+ dplyr::tbl_df(.)
+ }
[1] "data.frame"
Source: local data frame [1,000 x 5]
Item 1 Item 2 Item 3 Item 4 Item 5
(int) (int) (int) (int) (int)
1 0 0 0 0 0
2 0 0 0 0 0
3 0 0 0 0 0
4 0 0 0 0 1
5 0 0 0 0 1
6 0 0 0 0 1
7 0 0 0 0 1
8 0 0 0 0 1
9 0 0 0 0 1
10 0 0 0 1 0
.. ... ... ... ... ...
> # LSAT %>% descript() %>% plot()
descript
データフレームに対する記述統計
Arguments
- data
- n.print
- chi.squared
- B
> iris %>% descript(n.print = 3)
Descriptive statistics for the '.' data-set
Sample:
5 items and 150 sample units; 0 missing values
Proportions for each level of response:
$Sepal.Length
4.3 4.4 4.5 4.6 4.7 4.8 4.9 5 5.1 5.2
0.0067 0.0200 0.0067 0.0267 0.0133 0.0333 0.0400 0.0667 0.0600 0.0267
5.3 5.4 5.5 5.6 5.7 5.8 5.9 6 6.1 6.2
0.0067 0.0400 0.0467 0.0400 0.0533 0.0467 0.0200 0.0400 0.0400 0.0267
6.3 6.4 6.5 6.6 6.7 6.8 6.9 7 7.1 7.2
0.0600 0.0467 0.0333 0.0133 0.0533 0.0200 0.0267 0.0067 0.0067 0.0200
7.3 7.4 7.6 7.7 7.9
0.0067 0.0067 0.0067 0.0267 0.0067
$Sepal.Width
2 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3
0.0067 0.0200 0.0267 0.0200 0.0533 0.0333 0.0600 0.0933 0.0667 0.1733
3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4
0.0733 0.0867 0.0400 0.0800 0.0400 0.0267 0.0200 0.0400 0.0133 0.0067
4.1 4.2 4.4
0.0067 0.0067 0.0067
$Petal.Length
1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.9 3
0.0067 0.0067 0.0133 0.0467 0.0867 0.0867 0.0467 0.0267 0.0133 0.0067
3.3 3.5 3.6 3.7 3.8 3.9 4 4.1 4.2 4.3
0.0133 0.0133 0.0067 0.0067 0.0067 0.0200 0.0333 0.0200 0.0267 0.0133
4.4 4.5 4.6 4.7 4.8 4.9 5 5.1 5.2 5.3
0.0267 0.0533 0.0200 0.0333 0.0267 0.0333 0.0267 0.0533 0.0133 0.0133
5.4 5.5 5.6 5.7 5.8 5.9 6 6.1 6.3 6.4
0.0133 0.0200 0.0400 0.0200 0.0200 0.0133 0.0133 0.0200 0.0067 0.0067
6.6 6.7 6.9
0.0067 0.0133 0.0067
$Petal.Width
0.1 0.2 0.3 0.4 0.5 0.6 1 1.1 1.2 1.3
0.0333 0.1933 0.0467 0.0467 0.0067 0.0067 0.0467 0.0200 0.0333 0.0867
1.4 1.5 1.6 1.7 1.8 1.9 2 2.1 2.2 2.3
0.0533 0.0800 0.0267 0.0133 0.0800 0.0333 0.0400 0.0400 0.0200 0.0533
2.4 2.5
0.0200 0.0200
$Species
setosa versicolor virginica
0.3333 0.3333 0.3333
Frequencies of total scores:
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
Freq 0 0 0 0 0 0 2 1 1 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
Freq 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
Freq 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
Freq 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
Freq 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
116 117 118 119 120 121 122 123 124 125 126
Freq 0 0 0 0 0 0 0 0 0 0 0
Cronbach's alpha:
value
All Items 0.8166
Excluding Sepal.Length 0.7183
Excluding Sepal.Width 0.9181
Excluding Petal.Length 0.7403
Excluding Petal.Width 0.7097
Excluding Species 0.7085
Pairwise Associations:
Item i Item j p.value
1 1 2 0.30
2 2 3 0.20
3 1 4 0.14
rcor.test
変数の組み合わせによる相関係数の計算
Arguments
- mat
- p.adjust
- p.adjust.method
- ...
> Environment %>% data.matrix() %>% rcor.test(method = "kendall")
LeadPetrol RiverSea RadioWaste AirPollution Chemicals Nuclear
LeadPetrol ***** 0.385 0.260 0.457 0.305 0.279
RiverSea <0.001 ***** 0.399 0.548 0.403 0.320
RadioWaste <0.001 <0.001 ***** 0.506 0.623 0.484
AirPollution <0.001 <0.001 <0.001 ***** 0.504 0.382
Chemicals <0.001 <0.001 <0.001 <0.001 ***** 0.463
Nuclear <0.001 <0.001 <0.001 <0.001 <0.001 *****
upper diagonal part contains correlation coefficient estimates
lower diagonal part contains corresponding p-values
> iris %>% rcor.test()
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
Sepal.Length ***** -0.118 0.872 0.818 0.783
Sepal.Width 0.152 ***** -0.428 -0.366 -0.427
Petal.Length <0.001 <0.001 ***** 0.963 0.949
Petal.Width <0.001 <0.001 <0.001 ***** 0.957
Species <0.001 <0.001 <0.001 <0.001 *****
upper diagonal part contains correlation coefficient estimates
lower diagonal part contains corresponding p-values