Description Usage Arguments Details Value References See Also Examples
Fits a basic local independence model (BLIM) for probabilistic knowledge structures by minimum discrepancy maximum likelihood estimation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  blim(K, N.R, method = c("MD", "ML", "MDML"), R = as.binmat(N.R),
P.K = rep(1/nstates, nstates),
beta = rep(0.1, nitems), eta = rep(0.1, nitems),
betafix = rep(NA, nitems), etafix = rep(NA, nitems),
betaequal = NULL, etaequal = NULL,
errtype = c("both", "error", "guessing"),
errequal = FALSE, randinit = FALSE, incradius = 0,
tol = 1e07, maxiter = 10000, zeropad = 12)
blimMD(K, N.R, R = as.binmat(N.R), errtype = c("both", "error",
"guessing"), incrule = c("minimum", "hypblc1", "hypblc2"),
m = 1)
## S3 method for class 'blim'
anova(object, ..., test = c("Chisq", "none"))

K 
a statebyproblem indicator matrix representing the knowledge structure. An element is one if the problem is contained in the state, and else zero. 
N.R 
a (named) vector of absolute frequencies of response patterns. 
method 

R 
a personbyproblem indicator matrix of unique response patterns.
Per default inferred from the names of 
P.K 
the vector of initial parameter values for probabilities of knowledge states. 
beta, eta 
vectors of initial parameter values for probabilities of a careless error and a lucky guess, respectively. 
betafix, etafix 
vectors of fixed error and guessing parameter values;

betaequal, etaequal 
lists of vectors of problem indices; each vector represents an equivalence class: it contains the indices of problems for which the error or guessing parameters are constrained to be equal. (See Examples.) 
errtype 
deprecated, use 
errequal 
deprecated, use 
randinit 
logical, if 
incradius 
include knowledge states of distance from the minimum
discrepant states less than or equal to 
tol 
tolerance, stopping criterion for iteration. 
maxiter 
the maximum number of iterations. 
zeropad 
the maximum number of items for which an incomplete

incrule 
inclusion rule for knowledge states. (See Details.) 
m 
exponent for hyperbolic inclusion rules. 
object 
an object of class 
test 
should the pvalues of the chisquare distributions be reported? 
... 
additional arguments passed to other methods. 
See Doignon and Falmagne (1999) for details on the basic local independence model (BLIM) for probabilistic knowledge structures.
Minimum discrepancy (MD) minimizes the number of expected response errors (careless errors or lucky guesses). Maximum likelihood maximizes the likelihood, possibly at the expense of inflating the error and guessing parameters. Minimum discrepancy maximum likelihood (MDML) maximizes the likelihood subject to the constraint of minimum response errors. See Heller and Wickelmaier (2013) for details on the parameter estimation methods.
If randinit
is TRUE
, initial parameter values are sampled
uniformly with the constraint beta + eta < 1
(Weisstein, 2013) for
the error parameters, and with sum(P.K) == 1
(Rubin, 1981) for the
probabilities of knowledge states. Setting randinit
to TRUE
overrides any values given in the P.K
, beta
, and eta
arguments.
The degrees of freedom in the goodnessoffit test are calculated as number of possible response patterns minus one or number of respondents, whichever is smaller, minus number of parameters.
blimMD
uses minimum discrepancy estimation only. Apart from the
hyperbolic inclusion rules, all of its functionality is also provided by
blim
. It may be removed in the future.
An object of class blim
having the following components:
discrepancy 
the mean minimum discrepancy between response patterns and knowledge states. 
P.K 
the vector of estimated parameter values for probabilities of knowledge states. 
beta 
the vector of estimated parameter values for probabilities of a careless error. 
eta 
the vector of estimated parameter values for probabilities of a lucky guess. 
disc.tab 
the minimum discrepancy distribution. 
K 
the knowledge structure. 
N.R 
the vector of frequencies of response patterns. 
nitems 
the number of items. 
nstates 
the number of knowledge states. 
npatterns 
the number of response patterns. 
ntotal 
the number of respondents. 
nerror 
the number of response errors. 
npar 
the number of parameters. 
method 
the parameter estimation method. 
iter 
the number of iterations needed. 
loglik 
the loglikelihood. 
fitted.values 
the fitted response frequencies. 
goodness.of.fit 
the goodness of fit statistic including the likelihood ratio fitted vs. saturated model (G2), the degrees of freedom, and the pvalue of the corresponding chisquare distribution. (See Details.) 
Doignon, J.P., & Falmagne, J.C. (1999). Knowledge spaces. Berlin: Springer.
Heller, J., & Wickelmaier, F. (2013). Minimum discrepancy estimation in probabilistic knowledge structures. Electronic Notes in Discrete Mathematics, 42, 49–56.
Rubin, D.B. (1981). The Bayesian bootstrap. The Annals of Statistics, 9, 130–134.
Weisstein, E.W. (2013, August 29). Triangle point picking. In MathWorld – A Wolfram Web Resource. Retrieved from http://mathworld.wolfram.com/TrianglePointPicking.html.
simulate.blim
, plot.blim
,
residuals.blim
, logLik.blim
,
simulate.blim
, delineate
,
jacobian
, endm
, probability
,
chess
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  data(DoignonFalmagne7)
K < DoignonFalmagne7$K # knowledge structure
N.R < DoignonFalmagne7$N.R # frequencies of response patterns
## Fit basic local independence model (BLIM) by different methods
blim(K, N.R, method = "MD") # minimum discrepancy estimation
blim(K, N.R, method = "ML") # maximum likelihood estimation by EM
blim(K, N.R, method = "MDML") # MDML estimation
## Parameter restrictions: beta_a = beta_b = beta_d, beta_c = beta_e
## eta_a = eta_b = 0.1
m1 < blim(K, N.R, method = "ML",
betaequal = list(c(1, 2, 4), c(3, 5)),
etafix = c(0.1, 0.1, NA, NA, NA))
m2 < blim(K, N.R, method = "ML")
anova(m1, m2)
## See ?endm, ?probability, and ?chess for further examples.

Loading required package: sets
Basic local independence models (BLIMs)
Number of knowledge states: 9
Number of response patterns: 32
Number of respondents: 1000
Method: Minimum discrepancy
Number of iterations: 1
Goodness of fit (2 log likelihood ratio):
G2(13) = 91.284, p = 7.9381e14
Minimum discrepancy distribution (mean = 0.254)
0 1 2
760 226 14
Mean number of errors (total = 0.254)
careless error lucky guess
0.164 0.090
Error and guessing parameters
beta eta
a 0.092089 0.000000
b 0.088720 0.000000
c 0.045058 0.040640
d 0.000000 0.040858
e 0.000000 0.054722
Basic local independence models (BLIMs)
Number of knowledge states: 9
Number of response patterns: 32
Number of respondents: 1000
Method: Maximum likelihood
Number of iterations: 300
Goodness of fit (2 log likelihood ratio):
G2(13) = 12.623, p = 0.47735
Minimum discrepancy distribution (mean = 0.254)
0 1 2
760 226 14
Mean number of errors (total = 0.48767)
careless error lucky guess
0.44280716 0.04486539
Error and guessing parameters
beta eta
a 0.164871 0.103065
b 0.163113 0.095074
c 0.188839 0.000004
d 0.079835 0.000003
e 0.088648 0.019910
Basic local independence models (BLIMs)
Number of knowledge states: 9
Number of response patterns: 32
Number of respondents: 1000
Method: Minimum discrepancy maximum likelihood
Number of iterations: 122
Goodness of fit (2 log likelihood ratio):
G2(13) = 79.192, p = 1.565e11
Minimum discrepancy distribution (mean = 0.254)
0 1 2
760 226 14
Mean number of errors (total = 0.254)
careless error lucky guess
0.19166336 0.06233664
Error and guessing parameters
beta eta
a 0.112944 0.000000
b 0.107871 0.000000
c 0.027133 0.010689
d 0.000000 0.012976
e 0.000000 0.063495
Analysis of Deviance Table
Model 1: m1
Model 2: m2
Resid. Df Resid. Dev Df Deviance Pr(>Chi)
1 18 12.630
2 13 12.623 5 0.0069751 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.