# NOT RUN {
set.seed(2342)
bmat <- sim_bmat(n_items = 2, k = 2, ncat = c(2, 5))$bmat
theta <- rnorm(500)
dat <- sim_data(bmat = bmat, theta = theta, maxncat = 5)
# k = 0
fmp0a <- fmp_1(dat = dat[, 1], k = 0, tsur = theta)
fmp0b <- fmp_1(dat = dat[, 2], k = 0, tsur = theta)
# }
# NOT RUN {
# k = 1
fmp1a <- fmp_1(dat = dat[, 1], k = 1, tsur = theta)
fmp1b <- fmp_1(dat = dat[, 2], k = 1, tsur = theta)
# }
# NOT RUN {
## compare estimated curves to the data-generating curve
rimse(fmp0a$bmat, bmat[1, -c(2:4)])
rimse(fmp0b$bmat, bmat[2, ], ncat = 5)
# }
# NOT RUN {
rimse(fmp1a$bmat, bmat[1, -c(2:4)])
rimse(fmp1b$bmat, bmat[2, ], ncat = 5)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab