Description Usage Arguments Examples
Routine functions for the 3PL model
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | model_3pl_prob(t, a, b, c, D = 1.702)
model_3pl_info(t, a, b, c, D = 1.702)
model_3pl_lh(u, t, a, b, c, D = 1.702, log = FALSE)
model_3pl_rescale(t, a, b, c, param = c("t", "b"), mean = 0, sd = 1)
model_3pl_gendata(n_p, n_i, t = NULL, a = NULL, b = NULL, c = NULL,
D = 1.702, t_dist = c(0, 1), a_dist = c(-0.1, 0.2), b_dist = c(0,
0.7), c_dist = c(5, 46), missing = NULL)
model_3pl_plot(a, b, c, D = 1.702, type = c("prob", "info"),
total = FALSE, xaxis = seq(-4, 4, 0.1))
model_3pl_plot_loglh(u, a, b, c, D = 1.702, xaxis = seq(-4, 4, 0.1),
show_mle = FALSE)
|
t |
ability parameters, 1d vector |
a |
discrimination parameters, 1d vector |
b |
difficulty parameters, 1d vector |
c |
guessing parameters, 1d vector |
D |
the scaling constant, 1.702 by default |
u |
observed responses, 2d matrix |
log |
True to return log-likelihood |
param |
the parameter of the new scale: 't' or 'b' |
mean |
the mean of the new scale |
sd |
the standard deviation of the new scale |
n_p |
the number of people to be generated |
n_i |
the number of items to be generated |
t_dist |
parameters of the normal distribution used to generate t-parameters |
a_dist |
parameters of the lognormal distribution used to generate a-parameters |
b_dist |
parameters of the normal distribution used to generate b-parameters |
c_dist |
parameters of the beta distribution used to generate c-parameters |
missing |
the proportion or number of missing responses |
type |
the type of plot: 'prob' for item characteristic curve (ICC) and 'info' for item information function curve (IIFC) |
total |
TRUE to sum values over items |
xaxis |
the values of x-axis |
show_mle |
TRUE to print maximum likelihood estimates |
1 2 3 4 5 6 7 8 | with(model_3pl_gendata(10, 5), model_3pl_prob(t, a, b, c))
with(model_3pl_gendata(10, 5), model_3pl_info(t, a, b, c))
with(model_3pl_gendata(10, 5), model_3pl_lh(u, t, a, b, c))
model_3pl_gendata(10, 5)
model_3pl_gendata(10, 5, a=1, c=0, missing=.1)
with(model_3pl_gendata(10, 5), model_3pl_plot(a, b, c, type="prob"))
with(model_3pl_gendata(10, 5), model_3pl_plot(a, b, c, type="info", total=TRUE))
with(model_3pl_gendata(5, 50), model_3pl_plot_loglh(u, a, b, c, show_mle=TRUE))
|
[,1] [,2] [,3] [,4] [,5]
[1,] 0.1829355 0.4254323 0.1363073 0.2031461 0.1778287
[2,] 0.5046475 0.8266815 0.3876319 0.5582582 0.3387967
[3,] 0.2597979 0.5552196 0.1779739 0.2747531 0.2054932
[4,] 0.3909424 0.7256275 0.2755427 0.4206869 0.2670847
[5,] 0.3377808 0.6643490 0.2319247 0.3588979 0.2397223
[6,] 0.8675266 0.9811755 0.8660540 0.9324045 0.7593863
[7,] 0.3581039 0.6889653 0.2479390 0.3821908 0.2497701
[8,] 0.9421832 0.9940671 0.9546734 0.9784365 0.8958678
[9,] 0.9285523 0.9920903 0.9401314 0.9712324 0.8699757
[10,] 0.8412930 0.9754553 0.8311749 0.9128176 0.7154812
[,1] [,2] [,3] [,4] [,5]
[1,] 0.3006457 0.1409672 0.2558677 0.36933324 0.02635852
[2,] 0.4634442 0.6774846 0.4444850 0.30633051 0.26477582
[3,] 0.2241985 0.4354933 0.2457925 0.09210791 0.73573434
[4,] 0.2486762 0.4948834 0.2703627 0.10443916 0.74940475
[5,] 0.4399105 0.4503326 0.4024954 0.36439656 0.12460333
[6,] 0.4597788 0.7203301 0.4460621 0.28893674 0.30993517
[7,] 0.3360843 0.6885634 0.3537021 0.15543484 0.68948596
[8,] 0.2905670 0.5930694 0.3112385 0.12728493 0.74043571
[9,] 0.4621402 0.6029563 0.4358563 0.32993741 0.20656763
[10,] 0.3230777 0.6629940 0.3418023 0.14695599 0.70810503
[,1] [,2] [,3] [,4] [,5]
[1,] 0.9455544 0.5659695 0.78483052 0.77775319 0.4495936
[2,] 0.6235822 0.8943393 0.76397566 0.27879483 0.9168401
[3,] 0.8405757 0.6529606 0.41542844 0.60587951 0.3146916
[4,] 0.9914714 0.8498114 0.05384413 0.06896392 0.8586395
[5,] 0.9600924 0.6259479 0.17356379 0.81482786 0.6165133
[6,] 0.9808676 0.7498857 0.89889784 0.88266011 0.7523762
[7,] 0.9726769 0.6934497 0.86797609 0.14694905 0.6908043
[8,] 0.9619336 0.3652617 0.83214792 0.17999936 0.6262059
[9,] 0.4971443 0.8600133 0.29554157 0.65791676 0.8870860
[10,] 0.8908731 0.5759878 0.66499440 0.32556561 0.3959380
$u
[,1] [,2] [,3] [,4] [,5]
[1,] 1 0 1 0 1
[2,] 0 1 1 0 1
[3,] 0 0 0 0 1
[4,] 1 1 1 0 1
[5,] 1 1 0 0 0
[6,] 1 1 1 1 1
[7,] 1 0 0 0 1
[8,] 0 0 1 0 0
[9,] 1 1 1 1 1
[10,] 0 1 1 1 1
$t
[1] -0.38182406 -0.29279941 0.80310766 0.09905323 0.54314175 0.70633430
[7] 0.99660005 -1.80279760 0.32921080 0.32989297
$a
[1] 0.8552435 0.6831490 0.4445557 1.1667906 1.1418021
$b
[1] -0.97258626 -0.02326964 0.17288273 0.30913589 -0.38357168
$c
[1] 0.13597803 0.06101063 0.09213046 0.05187339 0.08045003
$u
[,1] [,2] [,3] [,4] [,5]
[1,] 1 1 NA 1 1
[2,] 0 0 0 1 0
[3,] 1 0 0 NA 0
[4,] 1 0 0 1 1
[5,] 1 1 0 1 1
[6,] 0 0 0 0 1
[7,] 0 NA 0 0 NA
[8,] NA 1 0 0 1
[9,] 1 0 0 0 0
[10,] 1 0 1 1 1
$t
[1] 0.6864746 -1.4031646 -1.1289165 0.2296221 0.6668659 -0.6225756
[7] -2.0097416 0.4872205 -0.7448660 0.3316138
$a
[1] 1 1 1 1 1
$b
[1] -1.315435143 0.037834062 0.516030327 0.009647626 0.017258225
$c
[1] 0 0 0 0 0
[1] 0.4 0.3 -0.7 -0.2 -1.1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.