diff --git a/DESCRIPTION b/DESCRIPTION
index e02ba87..dba7661 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,8 +1,8 @@
Package: TAM
Type: Package
Title: Test Analysis Modules
-Version: 4.0-1
-Date: 2021-06-25 14:15:15
+Version: 4.1-1
+Date: 2022-05-15 09:03:38
Author:
Alexander Robitzsch [aut,cre] (),
Thomas Kiefer [aut],
@@ -27,7 +27,7 @@ Imports:
graphics, methods, Rcpp, stats, utils
Suggests:
coda, GPArotation, grDevices, lattice, lavaan, MASS,
- miceadds, mvtnorm, plyr, psych, sfsmisc, sirt, splines,
+ miceadds, mvtnorm, plyr, psych, sfsmisc, splines,
WrightMap
LinkingTo:
Rcpp, RcppArmadillo
diff --git a/R/IRT.informationCurve.R b/R/IRT.informationCurve.R
index d54db20..5d516d9 100644
--- a/R/IRT.informationCurve.R
+++ b/R/IRT.informationCurve.R
@@ -1,5 +1,5 @@
## File Name: IRT.informationCurve.R
-## File Version: 9.19
+## File Version: 9.212
@@ -47,25 +47,19 @@ informationCurves_mml <- function( object, h=.0001,
B=B, xsi=xsi, theta=theta, nnodes=nnodes,
maxK=maxK, recalc=TRUE)
- #****
- # calculate probabilities
- if ( class(object) %in% c("tam.mml","tam.mml.2pl", "tam.mml.mfr") ){
+ #--- calculate probabilities
+ if ( inherits(object, c("tam.mml","tam.mml.2pl", "tam.mml.mfr") ) ){
fct <- "tam_calc_prob"
- p0 <- do.call( what=fct, args=calc_args )$rprobs
- p1 <- do.call( what=fct, args=tam_args_replace_value( args=calc_args,
- variable="theta", value=theta+h ) )$rprobs
- p2 <- do.call( what=fct, args=tam_args_replace_value( args=calc_args,
- variable="theta", value=theta-h ) )$rprobs
}
- if ( class(object) %in% c("tam.mml.3pl" ) ){
+ if ( inherits(object, c("tam.mml.3pl") ) ){
calc_args$guess <- guess
fct <- "tam_mml_3pl_calc_prob"
- p0 <- do.call( what=fct, args=calc_args )$rprobs
- p1 <- do.call( what=fct, args=tam_args_replace_value( args=calc_args,
- variable="theta", value=theta+h ) )$rprobs
- p2 <- do.call( what=fct, args=tam_args_replace_value( args=calc_args,
- variable="theta", value=theta-h ) )$rprobs
}
+ p0 <- do.call( what=fct, args=calc_args )$rprobs
+ args1 <- tam_args_replace_value( args=calc_args, variable="theta", value=theta+h )
+ p1 <- do.call( what=fct, args=args1 )$rprobs
+ args2 <- tam_args_replace_value( args=calc_args, variable="theta", value=theta-h )
+ p2 <- do.call( what=fct, args=args2 )$rprobs
p0a <- p0
p0[ is.na(p0) ] <- 0
p1[ is.na(p1) ] <- 0
diff --git a/R/IRT.residuals.R b/R/IRT.residuals.R
index 08da4e2..f878fa6 100644
--- a/R/IRT.residuals.R
+++ b/R/IRT.residuals.R
@@ -1,5 +1,5 @@
## File Name: IRT.residuals.R
-## File Version: 9.15
+## File Version: 9.161
#####################################################
@@ -15,7 +15,7 @@ IRT.residuals <- function (object, ...)
tam.residuals <- function( object, ... )
{
tamobj <- object
- if (class(tamobj)!="tam.jml"){
+ if (! inherits(tamobj,"tam.jml")){
res <- tam.wle( tamobj, progress=FALSE, output.prob=TRUE, ... )
probs <- res$probs
probs[ is.na(probs) ] <- 0
diff --git a/R/IRTLikelihood.cfa.R b/R/IRTLikelihood.cfa.R
index dffe579..4e75da7 100644
--- a/R/IRTLikelihood.cfa.R
+++ b/R/IRTLikelihood.cfa.R
@@ -1,5 +1,5 @@
## File Name: IRTLikelihood.cfa.R
-## File Version: 9.19
+## File Version: 9.201
#---- IRTLikelihood for fitted CFA model
IRTLikelihood.cfa <- function( data, cfaobj=NULL,
@@ -25,7 +25,7 @@ IRTLikelihood.cfa <- function( data, cfaobj=NULL,
}
theta0 <- snodes.adj * seq(-3,3,len=21)
if (D>2){
- r1 <- sirt_import_sfsmisc_QUnif(n=snodes, min=0, max=1, n.min=1, p=D, leap=409)
+ r1 <- tam_import_sfsmisc_QUnif(n=snodes, min=0, max=1, n.min=1, p=D, leap=409)
theta <- stats::qnorm( r1 )
for ( dd in 1:D){
theta[,dd] <- snodes.adj*theta[,dd]
diff --git a/R/RcppExports.R b/R/RcppExports.R
index 6bc7268..6a4cb9e 100644
--- a/R/RcppExports.R
+++ b/R/RcppExports.R
@@ -1,5 +1,5 @@
## File Name: RcppExports.R
-## File Version: 4.000001
+## File Version: 4.001001
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
diff --git a/R/designMatrices_aux.R b/R/designMatrices_aux.R
index dc84c43..064018c 100644
--- a/R/designMatrices_aux.R
+++ b/R/designMatrices_aux.R
@@ -1,5 +1,5 @@
## File Name: designMatrices_aux.R
-## File Version: 9.103
+## File Version: 9.104
#############################################################
print.designMatrices <-
@@ -215,8 +215,6 @@ if (FALSE){
ind.mm <- grep(sg, rownames(mm))
mm.sg.temp <- rbind( 0, apply( mm[ ind.mm,], 2, cumsum ) )
# mm.sg.temp <- rbind( 0, colCumsums.sirt( mm[ ind.mm,] ) )
- # substitute the following line later if the sirt function
- # colCumsums.sirt is available at CRAN
# mm.sg.temp <- rbind( 0, colCumsums.sirt( mm[ grep(sg, rownames(mm)),] ) )
rownames(mm.sg.temp)[1] <- gsub("step([[:digit:]])*", "step0", sg, fixed=T)
A <- rbind(A, mm.sg.temp)
diff --git a/R/plotDevianceTAM.R b/R/plotDevianceTAM.R
index 48e09fa..ede7590 100644
--- a/R/plotDevianceTAM.R
+++ b/R/plotDevianceTAM.R
@@ -1,10 +1,11 @@
## File Name: plotDevianceTAM.R
-## File Version: 9.10
-###############################################################################
-plotDevianceTAM <- function ( tam.obj, omitUntil=1, reverse=TRUE,
+## File Version: 9.111
+
+
+plotDevianceTAM <- function ( tam.obj, omitUntil=1, reverse=TRUE,
change=TRUE)
{
- stopifnot(class(tam.obj) %in% c("tam.mml","tam.mml.2pl","tam.mml.mfr","tam.mml.3pl","tamaan") )
+ stopifnot(inherits(tam.obj, c("tam.mml","tam.mml.2pl","tam.mml.mfr","tam.mml.3pl","tamaan")) )
devhistory <- tam.obj$deviance.history
if(omitUntil>0) {
@@ -20,7 +21,7 @@ plotDevianceTAM <- function ( tam.obj, omitUntil=1, reverse=TRUE,
}
if(reverse){
- devChange <- -1 * devChange
+ devChange <- -devChange
}
devChange <- data.frame ( nr=omitUntil + 1:length(devChange), devChange)
xm <- ceiling( max(devChange[,1])/10 )*10
@@ -41,4 +42,3 @@ plotDevianceTAM <- function ( tam.obj, omitUntil=1, reverse=TRUE,
dcr <- devChange[devChange[,2]<0,]
graphics::points( dcr[,1], dcr[,2], pch=20, cex=cex, col="red")
}
-###############################################################################
diff --git a/R/summary.tam.R b/R/summary.tam.R
index a98d7e6..ef657e5 100644
--- a/R/summary.tam.R
+++ b/R/summary.tam.R
@@ -1,5 +1,5 @@
## File Name: summary.tam.R
-## File Version: 9.586
+## File Version: 9.587
#****** summary for tam object
summary.tam <- function( object, file=NULL, ...)
@@ -7,7 +7,7 @@ summary.tam <- function( object, file=NULL, ...)
tam_osink(file=file)
latreg <- FALSE
- if ( class(object)=="tam.latreg" ){
+ if ( inherits(object,"tam.latreg") ){
latreg <- TRUE
object$irtmodel <- "tam.latreg"
}
diff --git a/R/tam.fit.R b/R/tam.fit.R
index f0011f9..c2714b4 100644
--- a/R/tam.fit.R
+++ b/R/tam.fit.R
@@ -1,12 +1,12 @@
## File Name: tam.fit.R
-## File Version: 9.16
+## File Version: 9.171
tam.fit <- function( tamobj, ... )
{
CALL <- match.call()
- if(class(tamobj)=="tam.mml"){
+ if(inherits(tamobj,"tam.mml")){
res <- tam.mml.fit( tamobj, ...)
}
- if(class(tamobj)=="tam.jml"){
+ if(inherits(tamobj,"tam.jml")){
res <- tam.jml.fit( tamobj, ...)
}
res$CALL <- CALL
diff --git a/R/tam.mml.3pl.R b/R/tam.mml.3pl.R
index 9229a56..485fe44 100644
--- a/R/tam.mml.3pl.R
+++ b/R/tam.mml.3pl.R
@@ -1,5 +1,5 @@
## File Name: tam.mml.3pl.R
-## File Version: 9.881
+## File Version: 9.882
tam.mml.3pl <- function( resp, Y=NULL, group=NULL,
formulaY=NULL, dataY=NULL,
@@ -718,7 +718,7 @@ tam.mml.3pl <- function( resp, Y=NULL, group=NULL,
se.xsi.min -> se.xsi
se.B.min -> se.B
- #*** include NAs in AXsi
+ #*** include NAs in AXsi
AXsi <- tam_mml_include_NA_AXsi(AXsi=AXsi, maxcat=maxK, A=A, xsi=xsi)
#**** standard errors AXsi
diff --git a/R/tam.modelfit.IRT.R b/R/tam.modelfit.IRT.R
index 5c09a83..0cac707 100644
--- a/R/tam.modelfit.IRT.R
+++ b/R/tam.modelfit.IRT.R
@@ -1,15 +1,14 @@
## File Name: tam.modelfit.IRT.R
-## File Version: 0.03
+## File Version: 0.06
-###############################################################
tam.modelfit.IRT <- function( object, progress=TRUE )
{
resp <- IRT.data(object)
probs <- IRT.irfprob(object)
theta <- attr( probs, "theta" )
post <- IRT.posterior( object )
- res <- tam.modelfit.args( resp, probs, theta, post, progress)
+ res <- tam.modelfit.args( resp=resp, probs=probs, theta=theta,
+ post=post, progress=progress)
return(res)
}
-#############################################################
diff --git a/R/tam.modelfit.R b/R/tam.modelfit.R
index c0ff53c..1819d36 100644
--- a/R/tam.modelfit.R
+++ b/R/tam.modelfit.R
@@ -1,5 +1,5 @@
## File Name: tam.modelfit.R
-## File Version: 9.38
+## File Version: 9.406
# Q3 statistic and model fit statistics for objects of class tam
@@ -127,12 +127,11 @@ tam.modelfit <- function( tamobj, progress=TRUE )
chisquare.itemfit$p[ii] <- min( stats::p.adjust( h1$p, method="holm") )
}
chisquare.itemfit$p.holm <- stats::p.adjust( chisquare.itemfit$p, method="holm")
+
# maximum chi square
- modelfit.test <- data.frame(
- "maxX2"=max( chi2.stat$chi2),
- "Npairs"=nrow(chi2.stat),
- "p.holm"=min( chi2.stat$p.holm[pair_exists] )
- )
+ modelfit.test <- data.frame( maxX2=max( chi2.stat$chi2),
+ Npairs=nrow(chi2.stat),
+ p.holm=min( chi2.stat$p.holm[pair_exists] ) )
#** modelfit.stat
modelfit.stat <- fitstat
diff --git a/R/tam.modelfit.args.R b/R/tam.modelfit.args.R
index cfc5118..7a7ca12 100644
--- a/R/tam.modelfit.args.R
+++ b/R/tam.modelfit.args.R
@@ -1,16 +1,14 @@
## File Name: tam.modelfit.args.R
-## File Version: 0.06
+## File Version: 0.08
-########################################################
-# tam.modelfit with user defined input
+#-- tam.modelfit with user defined input
tam.modelfit.args <- function( resp, probs, theta, post, progress=TRUE )
{
resp.ind <- as.matrix( 1- is.na(resp) )
- tamobj <- list( resp=resp, rprobs=probs,
- theta=theta, hwt=post,
+ tamobj <- list( resp=resp, rprobs=probs, theta=theta, hwt=post,
resp.ind=resp.ind )
res <- tam.modelfit( tamobj=tamobj, progress=progress)
return(res)
}
-########################################################
+
diff --git a/R/tam.personfit.R b/R/tam.personfit.R
index 8b1e6bc..d60ba2a 100644
--- a/R/tam.personfit.R
+++ b/R/tam.personfit.R
@@ -1,10 +1,10 @@
## File Name: tam.personfit.R
-## File Version: 0.06
+## File Version: 0.07
tam.personfit <- function(tamobj)
{
#** WLE estimation in case of MML estimation
- if ( class(tamobj) !="tam.jml" ){
+ if ( ! inherits(tamobj,"tam.jml") ){
res <- tam.wle(tamobj, progress=FALSE)
tamobj$theta <- res$theta
tamobj$xsi <- tamobj$xsi$xsi
diff --git a/R/tam.pv.R b/R/tam.pv.R
index 8175249..99257af 100644
--- a/R/tam.pv.R
+++ b/R/tam.pv.R
@@ -1,5 +1,5 @@
## File Name: tam.pv.R
-## File Version: 9.466
+## File Version: 9.468
tam.pv <- function( tamobj, nplausible=10,
ntheta=2000, normal.approx=FALSE, samp.regr=FALSE,
theta.model=FALSE, np.adj=8, na.grid=5, verbose=TRUE)
@@ -26,13 +26,13 @@ tam.pv <- function( tamobj, nplausible=10,
#-- check for recommendation of tam.pv.mcmc
res <- tam_pv_recommend_tam_pv_mcmc(tamobj=tamobj)
- if ( class(tamobj)=="tam.latreg" ){
+ if ( inherits(tamobj,"tam.latreg") ){
theta.model <- TRUE
latreg <- TRUE
like <- tamobj$like
}
if ( ! latreg ){
- if (class(tamobj)!="tam.mml.3pl"){
+ if ( ! inherits(tamobj,"tam.mml.3pl") ){
guess <- rep( 0, dim(tamobj$B)[1] )
} else {
guess <- tamobj$guess
diff --git a/R/tam.se.R b/R/tam.se.R
index 1bd4665..035c33e 100644
--- a/R/tam.se.R
+++ b/R/tam.se.R
@@ -1,19 +1,20 @@
## File Name: tam.se.R
-## File Version: 9.15
+## File Version: 9.161
+
tam.se <- function( tamobj, item_pars=TRUE, ...)
{
SE.quick <- TRUE
#-------------------------------
## "quick" standard errors
if(SE.quick){
- if(class(tamobj) %in% c("tam.mml") ){
+ if(inherits(tamobj,"tam.mml") ){
res <- tam_mml_se_quick( tamobj=tamobj, item_pars=item_pars, ...)
}
- if(class(tamobj) %in% c("tam.latreg") ){
+ if(inherits(tamobj,"tam.latreg") ){
res <- tam_latreg_se_quick( tamobj=tamobj, ...)
}
- if(class(tamobj)=="tam.jml"){
+ if(inherits(tamobj,"tam.jml")){
# res <- tam.jml.se( tamobj, ...)
## include standard errors here!!
}
diff --git a/R/tam.threshold.R b/R/tam.threshold.R
index 7896f77..0bbcabc 100644
--- a/R/tam.threshold.R
+++ b/R/tam.threshold.R
@@ -1,5 +1,5 @@
## File Name: tam.threshold.R
-## File Version: 9.15
+## File Version: 9.161
#**** Thurstonian thresholds (gammas)
@@ -11,7 +11,7 @@ tam.threshold <- function (tamobj, prob.lvl=0.5)
maxK <- tamobj$maxK
AXsi <- tamobj$AXsi
xsi <- tamobj$xsi
- if (class(tamobj)!="tam.jml"){
+ if (! inherits(tamobj,"tam.jml")){
xsi <- xsi[,1]
}
A <- tamobj$A
diff --git a/R/tam.wle.R b/R/tam.wle.R
index f75ea7d..1ff5e23 100644
--- a/R/tam.wle.R
+++ b/R/tam.wle.R
@@ -1,16 +1,16 @@
## File Name: tam.wle.R
-## File Version: 9.16
+## File Version: 9.171
tam.wle <- function( tamobj, ... )
{
CALL <- match.call()
- if(class(tamobj)=="tam.mml"){
+ if(inherits(tamobj,"tam.mml")){
res <- tam.mml.wle2( tamobj, ...)
}
- if(class(tamobj)=="tamaan"){
+ if(inherits(tamobj,"tamaan")){
res <- tam.mml.wle2( tamobj, ...)
}
- if(class(tamobj)=="tam.jml"){
+ if(inherits(tamobj,"tam.jml")){
res <- tam_jml_wle( tamobj, ...)
}
attr(res,"call") <- CALL
diff --git a/R/sirt_import_sfsmisc_QUnif.R b/R/tam_import_sfsmisc_QUnif.R
similarity index 58%
rename from R/sirt_import_sfsmisc_QUnif.R
rename to R/tam_import_sfsmisc_QUnif.R
index 5ee2619..464f753 100644
--- a/R/sirt_import_sfsmisc_QUnif.R
+++ b/R/tam_import_sfsmisc_QUnif.R
@@ -1,7 +1,7 @@
-## File Name: sirt_import_sfsmisc_QUnif.R
-## File Version: 0.05
+## File Name: tam_import_sfsmisc_QUnif.R
+## File Version: 0.061
-sirt_import_sfsmisc_QUnif <- function(n, min=0, max=1, n.min=1, p,
+tam_import_sfsmisc_QUnif <- function(n, min=0, max=1, n.min=1, p,
leap=409, ...)
{
require_namespace_msg("sfsmisc")
diff --git a/R/tam_mml_create_nodes.R b/R/tam_mml_create_nodes.R
index fba9ad7..b0d44c9 100644
--- a/R/tam_mml_create_nodes.R
+++ b/R/tam_mml_create_nodes.R
@@ -1,5 +1,5 @@
## File Name: tam_mml_create_nodes.R
-## File Version: 0.31
+## File Version: 0.331
tam_mml_create_nodes <- function(snodes, nodes, ndim, QMC,
skillspace="normal", theta.k=NULL)
@@ -48,7 +48,8 @@ tam_mml_create_nodes <- function(snodes, nodes, ndim, QMC,
# sampled theta values
if (QMC){
fac <- 1
- r1 <- sirt_import_sfsmisc_QUnif(n=snodes, min=0, max=1, n.min=1, p=ndim, leap=409)
+ r1 <- tam_import_sfsmisc_QUnif(n=snodes, min=0, max=1, n.min=1,
+ p=ndim, leap=409)
theta0.samp <- fac * stats::qnorm(r1)
if (ndim==1){
theta0.samp <- theta0.samp[ order(theta0.samp[,1]), ]
diff --git a/R/tam_osink.R b/R/tam_osink.R
index 84c050a..2bb8994 100644
--- a/R/tam_osink.R
+++ b/R/tam_osink.R
@@ -1,7 +1,7 @@
## File Name: tam_osink.R
-## File Version: 0.04
+## File Version: 0.05
-tam_osink <- function(file, suffix="__SUMMARY.Rout")
+tam_osink <- function(file, suffix=".Rout")
{
CDM::osink( file=file, suffix=suffix )
}
diff --git a/R/tamaan.R b/R/tamaan.R
index 5aff263..11e4d9b 100644
--- a/R/tamaan.R
+++ b/R/tamaan.R
@@ -1,5 +1,5 @@
## File Name: tamaan.R
-## File Version: 9.215
+## File Version: 9.219
#--- tamaan function
diff --git a/R/tamaanify.R b/R/tamaanify.R
index 8507ccf..6fcf18a 100644
--- a/R/tamaanify.R
+++ b/R/tamaanify.R
@@ -1,5 +1,5 @@
## File Name: tamaanify.R
-## File Version: 9.216
+## File Version: 9.233
#--- tamaanify function
@@ -40,35 +40,31 @@ tamaanify <- function( tammodel, resp, tam.method=NULL, doparse=TRUE )
res$gammaslope.fixed <- NULL
#*** process analysis
- res <- tamaanify.proc.analysis( res )
+ res <- tamaanify_proc_analysis(res=res)
#*** extract lavaan model
res <- tamaanify_proc_lavaanmodel(res=res, resp=resp)
#*** item characteristics
- res <- tamaanify.proc.items( res, resp)
+ res <- tamaanify_proc_items(res=res, resp=resp)
#*** item type
- res <- tamaanify.proc.itemtype( res )
+ res <- tamaanify_proc_itemtype(res=res)
#*** include model constraints
- res <- tamaanify.proc.modelconstraint( res )
+ res <- tamaanify_proc_modelconstraint(res=res)
- #******
- # add response dataset
- cols <- paste(res$items$item)
- resp <- resp[, cols]
- res$resp <- resp
+ #*** add response dataset
+ res <- tamaanify_proc_resp(res=res, resp=resp)
- #**********
- # define design matrices and model for TAM
+ #*** define design matrices and model for TAM
res$method <- "tam.mml.2pl"
if ( ! is.null(tam.method) ){
res$method <- tam.method
}
#*** A matrix
- res <- tamaanify.create.A(res=res)
+ res <- tamaanify_create_A(res=res)
#*** Q matrix
res <- tamaanify_create_Q(res=res)
@@ -83,13 +79,13 @@ tamaanify <- function( tammodel, resp, tam.method=NULL, doparse=TRUE )
res <- tamaanify_variance_fixed(res=res)
#*** define design matrices for tam.mml.3pl method
- res <- tamaanify.tam.mml.3pl.designMatrices(res=res)
+ res <- tamaanify_tam_mml_3pl_designMatrices(res=res)
#*** delta design matrix
res <- tamaanify.tam.mml.3pl.deltadesign(res=res)
#**** model prior
- res <- tamaanify.modelprior(res=res)
+ res <- tamaanify_modelprior(res=res)
#*** define method
res <- tamaanify.define.method(res=res, tam.method=tam.method)
diff --git a/R/tamaanify.tam.mml.3pl.designMatrices.R b/R/tamaanify.tam.mml.3pl.designMatrices.R
deleted file mode 100644
index e8d9c9e..0000000
--- a/R/tamaanify.tam.mml.3pl.designMatrices.R
+++ /dev/null
@@ -1,18 +0,0 @@
-## File Name: tamaanify.tam.mml.3pl.designMatrices.R
-## File Version: 9.11
-
-
-#***** design matrices for estimation with tam.mml.3pl method
-tamaanify.tam.mml.3pl.designMatrices <- function(res)
-{
- anlist <- res$ANALYSIS.list
- res <- switch( anlist$type,
- "LCA"=tamaanify.tam.mml.3pl.designMatrices.LCA(res),
- "LOCLCA"=tamaanify.tam.mml.3pl.designMatrices.LOCLCA(res),
- "OLCA"=tamaanify.tam.mml.3pl.designMatrices.OLCA(res),
- "TRAIT"=tamaanify.tam.mml.3pl.designMatrices.TRAIT(res),
- "MIXTURE"=tamaanify.tam.mml.3pl.designMatrices.MIXTURE(res)
- )
- # output
- return(res)
-}
diff --git a/R/tamaanify.create.A.R b/R/tamaanify_create_A.R
similarity index 91%
rename from R/tamaanify.create.A.R
rename to R/tamaanify_create_A.R
index a207ec0..c6339f9 100644
--- a/R/tamaanify.create.A.R
+++ b/R/tamaanify_create_A.R
@@ -1,14 +1,15 @@
-## File Name: tamaanify.create.A.R
-## File Version: 9.11
+## File Name: tamaanify_create_A.R
+## File Version: 9.211
-#-- create A matrix
-tamaanify.create.A <- function(res)
+### create A matrix
+
+tamaanify_create_A <- function(res)
{
resp <- res$resp
lavpartable <- res$lavpartable
- #***********************************
- # create A matrix
+
+ #*** create A matrix
A <- designMatrices( resp=resp )
A <- A$A
items0 <- dimnames(A)[[1]] <- res$items$item
@@ -18,8 +19,7 @@ tamaanify.create.A <- function(res)
dimnames(A)[[3]] <- paste0( dimnames(A)[[3]], "_Cat1")
}
- #*********************************************
- # loop over items for smoothed nominal response models
+ #*** loop over items for smoothed nominal response models
smooth.nrm <- FALSE
itemtable <- res$items
items.ind <- grep( ",", paste(itemtable$itemtype), fixed=TRUE )
@@ -58,8 +58,7 @@ tamaanify.create.A <- function(res)
}
}
- #*********************************************
- #****** xsi parameter fixings
+ #*** xsi parameter fixings
xsi.fixed <- NULL
maxK <- max( res$items$ncat )-1
lavpartable <- lavpartable[ lavpartable$user !=-99, ]
@@ -120,8 +119,7 @@ tamaanify.create.A <- function(res)
dimnames(A)[[3]] <- paste(lavpartable0[ ind, "label" ])
}
- #***********************
- # model constraint thresholds
+ #*** model constraint thresholds
mdfr <- res$MODELCONSTRAINT.dfr
if ( ! is.null(mdfr) ){
mdfr <- mdfr[ grep( "|t", mdfr$fullsyn, fixed=TRUE), ]
@@ -167,10 +165,9 @@ tamaanify.create.A <- function(res)
}
}
}
- #**************************************
- #*** OUTPUT
+
+ #--- OUTPUT
res$A <- A
res$xsi.fixed <- xsi.fixed
return(res)
}
-#########################################################
diff --git a/R/tamaanify.modelprior.R b/R/tamaanify_modelprior.R
similarity index 93%
rename from R/tamaanify.modelprior.R
rename to R/tamaanify_modelprior.R
index 7622279..7789f05 100644
--- a/R/tamaanify.modelprior.R
+++ b/R/tamaanify_modelprior.R
@@ -1,9 +1,9 @@
-## File Name: tamaanify.modelprior.R
-## File Version: 9.09
+## File Name: tamaanify_modelprior.R
+## File Version: 9.114
-############################################
-# model prior parsing
-tamaanify.modelprior <- function(res)
+### model prior parsing
+
+tamaanify_modelprior <- function(res)
{
t1 <- res$tammodel.dfr
gammaslope.prior <- NULL
@@ -42,8 +42,7 @@ tamaanify.modelprior <- function(res)
if ( length(uu) >=5 ){ gg <- uu[5] } else {gg <- NA}
return(gg) } ) ))
- #********
- # type of prior parameter
+ #*** type of prior parameter
E <- res$E
Epars <- dimnames(E)[[4]]
dfr$gammaslope_index <- match( paste(dfr$parm), Epars )
@@ -73,6 +72,7 @@ tamaanify.modelprior <- function(res)
xsi.prior[ dfr0$A_index, ] <-
as.matrix( dfr0[, c("par1","par2") ] )
}
+
}
#**** index priors guessing parameters
@@ -100,9 +100,10 @@ tamaanify.modelprior <- function(res)
}
}
if ( is.null( res$gammaslope.prior) ){
- res$gammaslope.prior <- gammaslope.prior
+ res$gammaslope.prior <- gammaslope.prior
}
res$xsi.prior <- xsi.prior
res$guess.prior <- guess.prior
+
return(res)
}
diff --git a/R/tamaanify.proc.analysis.R b/R/tamaanify_proc_analysis.R
similarity index 75%
rename from R/tamaanify.proc.analysis.R
rename to R/tamaanify_proc_analysis.R
index 2d6f90c..060cc99 100644
--- a/R/tamaanify.proc.analysis.R
+++ b/R/tamaanify_proc_analysis.R
@@ -1,12 +1,11 @@
-## File Name: tamaanify.proc.analysis.R
-## File Version: 9.06
+## File Name: tamaanify_proc_analysis.R
+## File Version: 9.072
+### process analysis
-
-#########################################################
-# process analysis
-tamaanify.proc.analysis <- function( res ){
+tamaanify_proc_analysis <- function( res )
+{
tam1 <- res$tammodel.dfr
ind1 <- which( paste(tam1$syn)=="ANALYSIS:" )
res$ANALYSIS <- ""
@@ -17,42 +16,39 @@ tamaanify.proc.analysis <- function( res ){
ANALYSIS.list <- list()
if( length( grep("TYPE=LCA",dfr) ) > 0 ){
ANALYSIS.list$type <- "LCA"
- }
+ }
if( length( grep("TYPE=MIXTURE",dfr) ) > 0 ){
ANALYSIS.list$type <- "MIXTURE"
- }
+ }
# located latent class analysis
if( length( grep("TYPE=LOCLCA",dfr) ) > 0 ){
ANALYSIS.list$type <- "LOCLCA"
- }
+ }
# trait
if( length( grep("TYPE=TRAIT",dfr) ) > 0 ){
ANALYSIS.list$type <- "TRAIT"
- }
+ }
# ordered latent class analysis
if( length( grep("TYPE=OLCA",dfr) ) > 0 ){
ANALYSIS.list$type <- "OLCA"
- }
+ }
ind <- grep("NCLASSES", dfr )
if ( length(ind) > 0 ){
m1 <- gsub( "NCLASSES(", "", dfr[ind], fixed=TRUE )
m1 <- as.numeric( gsub(")", "", m1, fixed=TRUE ) )
ANALYSIS.list$NCLASSES <- m1
- }
+ }
ind <- grep("NSTARTS", dfr, fixed=TRUE)
if ( length(ind) > 0 ){
m1 <- gsub( "NSTARTS(", "", dfr[ind], fixed=TRUE )
m1 <- gsub(")", "", m1, fixed=TRUE )
m1 <- as.numeric( unlist( strsplit( m1, split=",", fixed=TRUE) ) )
ANALYSIS.list$NSTARTS <- m1
- }
-
+ }
res$ANALYSIS.list <- ANALYSIS.list
- } else {
-
+ } else {
res$ANALYSIS.list$type <- "TRAIT"
- }
- res$skillspace <- "normal"
- return(res)
- }
-##########################################################
+ }
+ res$skillspace <- "normal"
+ return(res)
+}
diff --git a/R/tamaanify.proc.items.R b/R/tamaanify_proc_items.R
similarity index 90%
rename from R/tamaanify.proc.items.R
rename to R/tamaanify_proc_items.R
index 3186487..cfc527e 100644
--- a/R/tamaanify.proc.items.R
+++ b/R/tamaanify_proc_items.R
@@ -1,11 +1,10 @@
-## File Name: tamaanify.proc.items.R
-## File Version: 9.09
+## File Name: tamaanify_proc_items.R
+## File Version: 9.104
+### process item characteristics
-############################################################
-# process item characteristics
-tamaanify.proc.items <- function( res, resp)
+tamaanify_proc_items <- function( res, resp)
{
lavpartable <- res$lavpartable
ind <- which( lavpartable$op=="=~" )
@@ -75,8 +74,9 @@ tamaanify.proc.items <- function( res, resp)
}
#*** thresholds
for (hh in 1:( max(maxK) ) ){
- ind <- which( ( paste(lavpartable2$rhs)==paste0("t", hh) ) & ( paste( lavpartable2$label )=="" ) &
- ( paste(lavpartable2$op)=="|" ) )
+ ind <- which( ( paste(lavpartable2$rhs)==paste0("t", hh) ) &
+ ( paste( lavpartable2$label )=="" ) &
+ ( paste(lavpartable2$op)=="|" ) )
if ( length(ind) > 0 ){
lavpartable2[ ind, "label" ] <- paste0( lavpartable2$lhs[ind], "_", "Cat", hh )
}
diff --git a/R/tamaanify.proc.itemtype.R b/R/tamaanify_proc_itemtype.R
similarity index 84%
rename from R/tamaanify.proc.itemtype.R
rename to R/tamaanify_proc_itemtype.R
index 699f218..32f0142 100644
--- a/R/tamaanify.proc.itemtype.R
+++ b/R/tamaanify_proc_itemtype.R
@@ -1,10 +1,10 @@
-## File Name: tamaanify.proc.itemtype.R
-## File Version: 9.08
+## File Name: tamaanify_proc_itemtype.R
+## File Version: 9.091
-############################################################
-# process item type
-tamaanify.proc.itemtype <- function( res )
+### process item type
+
+tamaanify_proc_itemtype <- function( res )
{
tam1 <- res$tammodel.dfr
ind1 <- which( paste(tam1$syn)=="ITEMTYPE:" )
@@ -40,4 +40,3 @@ tamaanify.proc.itemtype <- function( res )
}
return(res)
}
-############################################################
diff --git a/R/tamaanify.proc.modelconstraint.R b/R/tamaanify_proc_modelconstraint.R
similarity index 92%
rename from R/tamaanify.proc.modelconstraint.R
rename to R/tamaanify_proc_modelconstraint.R
index 645010a..193a1bf 100644
--- a/R/tamaanify.proc.modelconstraint.R
+++ b/R/tamaanify_proc_modelconstraint.R
@@ -1,11 +1,9 @@
-## File Name: tamaanify.proc.modelconstraint.R
-## File Version: 9.09
+## File Name: tamaanify_proc_modelconstraint.R
+## File Version: 9.102
+### process model constraint
-
-#########################################################
-# process model constraint
-tamaanify.proc.modelconstraint <- function( res )
+tamaanify_proc_modelconstraint <- function( res )
{
tam1 <- res$tammodel.dfr
ind1 <- which( paste(tam1$syn)=="MODELCONSTRAINT:" )
@@ -89,4 +87,4 @@ tamaanify.proc.modelconstraint <- function( res )
res$MODELCONSTRAINT.dfr <- dfr.syncon
return(res)
}
-######################################################################
+
diff --git a/R/tamaanify_proc_resp.R b/R/tamaanify_proc_resp.R
new file mode 100644
index 0000000..b90181e
--- /dev/null
+++ b/R/tamaanify_proc_resp.R
@@ -0,0 +1,11 @@
+## File Name: tamaanify_proc_resp.R
+## File Version: 0.01
+
+
+tamaanify_proc_resp <- function(res, resp)
+{
+ cols <- paste(res$items$item)
+ resp <- resp[, cols]
+ res$resp <- resp
+ return(res)
+}
diff --git a/R/tamaanify_tam_mml_3pl_designMatrices.R b/R/tamaanify_tam_mml_3pl_designMatrices.R
new file mode 100644
index 0000000..4ab8b77
--- /dev/null
+++ b/R/tamaanify_tam_mml_3pl_designMatrices.R
@@ -0,0 +1,17 @@
+## File Name: tamaanify_tam_mml_3pl_designMatrices.R
+## File Version: 9.215
+
+### design matrices for estimation with tam.mml.3pl method
+
+tamaanify_tam_mml_3pl_designMatrices <- function(res)
+{
+ res <- switch( res$ANALYSIS.list$type,
+ "LCA"=tamaanify.tam.mml.3pl.designMatrices.LCA(res=res),
+ "LOCLCA"=tamaanify.tam.mml.3pl.designMatrices.LOCLCA(res=res),
+ "OLCA"=tamaanify.tam.mml.3pl.designMatrices.OLCA(res=res),
+ "TRAIT"=tamaanify.tam.mml.3pl.designMatrices.TRAIT(res=res),
+ "MIXTURE"=tamaanify.tam.mml.3pl.designMatrices.MIXTURE(res=res)
+ )
+ # output
+ return(res)
+}
diff --git a/README.md b/README.md
index 6ffbbbe..7e6299e 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ If you use `TAM` and have suggestions for improvement or have found bugs, please
The manual may be found here [https://alexanderrobitzsch.github.io/TAM/](https://alexanderrobitzsch.github.io/TAM/)
-#### CRAN version `TAM` 3.7-16 (2021-06-24)
+#### CRAN version `TAM` 4.0-16 (2022-05-13)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version-last-release/TAM)](https://cran.r-project.org/package=TAM)
@@ -22,9 +22,9 @@ The CRAN version can be installed from within R using:
utils::install.packages("TAM")
```
-#### GitHub version `TAM` 4.0-1 (2021-06-25)
+#### GitHub version `TAM` 4.1-1 (2022-05-15)
-[![](https://img.shields.io/badge/github%20version-4.0--1-orange.svg)](https://github.com/alexanderrobitzsch/TAM)
+[![](https://img.shields.io/badge/github%20version-4.1--1-orange.svg)](https://github.com/alexanderrobitzsch/TAM)
The version hosted [here](https://github.com/alexanderrobitzsch/TAM) is the development version of `TAM`.
The GitHub version can be installed using `devtools` as:
diff --git a/docs/404.html b/docs/404.html
index 894a6ca..e040c9a 100644
--- a/docs/404.html
+++ b/docs/404.html
@@ -71,7 +71,7 @@
TAM
- 4.0-1
+ 4.1-1
diff --git a/docs/authors.html b/docs/authors.html
index 5e42c48..d84dca4 100644
--- a/docs/authors.html
+++ b/docs/authors.html
@@ -71,7 +71,7 @@
TAM
- 4.0-1
+ 4.1-1
@@ -111,12 +111,12 @@ Citation
Source: inst/CITATION
- Robitzsch, A., Kiefer, T., & Wu, M. (2021). TAM: Test Analysis Modules. R package version 4.0-1. https://CRAN.R-project.org/package=TAM
- @Manual{TAM_4.0-1,
+ Robitzsch, A., Kiefer, T., & Wu, M. (2022). TAM: Test Analysis Modules. R package version 4.1-1. https://CRAN.R-project.org/package=TAM
+ @Manual{TAM_4.1-1,
title = {TAM: Test Analysis Modules},
author = {Alexander Robitzsch and Thomas Kiefer and Margaret Wu},
- year = {2021},
- note = {R package version 4.0-1},
+ year = {2022},
+ note = {R package version 4.1-1},
url = {https://CRAN.R-project.org/package=TAM},
}
diff --git a/docs/index.html b/docs/index.html
index 62d3e17..14abc1e 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -43,7 +43,7 @@
TAM
- 4.0-1
+ 4.1-1
@@ -111,7 +111,7 @@
GitHub version
The version hosted here is the development version of TAM
. The GitHub version can be installed using devtools
as:
-devtools::install_github("alexanderrobitzsch/TAM")
+devtools::install_github("alexanderrobitzsch/TAM")
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index d7c4019..e57c35c 100644
--- a/docs/pkgdown.yml
+++ b/docs/pkgdown.yml
@@ -2,5 +2,5 @@ pandoc: 1.13.1
pkgdown: 1.5.1
pkgdown_sha: ~
articles: []
-last_built: 2021-06-25T12:33Z
+last_built: 2022-05-15T07:23Z
diff --git a/docs/reference/DescribeBy.html b/docs/reference/DescribeBy.html
index 13eb753..120c36a 100644
--- a/docs/reference/DescribeBy.html
+++ b/docs/reference/DescribeBy.html
@@ -72,7 +72,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/IRT.WrightMap.html b/docs/reference/IRT.WrightMap.html
index 4879af2..16c598f 100644
--- a/docs/reference/IRT.WrightMap.html
+++ b/docs/reference/IRT.WrightMap.html
@@ -76,7 +76,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/IRT.cv.html b/docs/reference/IRT.cv.html
index 6b699c8..08821c1 100644
--- a/docs/reference/IRT.cv.html
+++ b/docs/reference/IRT.cv.html
@@ -72,7 +72,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/IRT.data.tam.html b/docs/reference/IRT.data.tam.html
index fd9307f..db676b4 100644
--- a/docs/reference/IRT.data.tam.html
+++ b/docs/reference/IRT.data.tam.html
@@ -74,7 +74,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/IRT.drawPV.html b/docs/reference/IRT.drawPV.html
index 82abee7..99f71de 100644
--- a/docs/reference/IRT.drawPV.html
+++ b/docs/reference/IRT.drawPV.html
@@ -75,7 +75,7 @@
TAM
- 4.0-vv
+ 4.1-vv
@@ -150,11 +150,11 @@ Examp
#############################################################################
library(sirt)
-data(data.read,package="sirt")
+data(data.read, package="sirt")
dat <- data.read
# fit Rasch model
-mod <- rasch.mml2(dat)
+mod <- rasch.mml2(dat)
# draw 10 plausible values
pv1 <- TAM::IRT.drawPV(mod, NPV=10)
}
diff --git a/docs/reference/IRT.expectedCounts.tam.html b/docs/reference/IRT.expectedCounts.tam.html
index cfe3f77..abf2875 100644
--- a/docs/reference/IRT.expectedCounts.tam.html
+++ b/docs/reference/IRT.expectedCounts.tam.html
@@ -74,7 +74,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/IRT.factor.scores.tam.html b/docs/reference/IRT.factor.scores.tam.html
index 5abe8b8..5056dea 100644
--- a/docs/reference/IRT.factor.scores.tam.html
+++ b/docs/reference/IRT.factor.scores.tam.html
@@ -74,7 +74,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/IRT.frequencies.tam.html b/docs/reference/IRT.frequencies.tam.html
index d66dfd6..9b0e40a 100644
--- a/docs/reference/IRT.frequencies.tam.html
+++ b/docs/reference/IRT.frequencies.tam.html
@@ -74,7 +74,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/IRT.informationCurves.html b/docs/reference/IRT.informationCurves.html
index a808c0d..5c28bf7 100644
--- a/docs/reference/IRT.informationCurves.html
+++ b/docs/reference/IRT.informationCurves.html
@@ -72,7 +72,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/IRT.irfprob.tam.html b/docs/reference/IRT.irfprob.tam.html
index 5331e31..bc34187 100644
--- a/docs/reference/IRT.irfprob.tam.html
+++ b/docs/reference/IRT.irfprob.tam.html
@@ -74,7 +74,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/IRT.itemfit.html b/docs/reference/IRT.itemfit.html
index b5a8a86..8df5af5 100644
--- a/docs/reference/IRT.itemfit.html
+++ b/docs/reference/IRT.itemfit.html
@@ -76,7 +76,7 @@
TAM
- 4.0-vv
+ 4.1-vv
@@ -205,7 +205,7 @@ Examp
a <- rep(1,I)
a[c(3,8)] <- c( 1.7, .4 )
# simulate 2PL data
-dat <- sirt::sim.raschtype( theta=rnorm(N), b=b, fixed.a=a)
+dat <- sirt::sim.raschtype( theta=rnorm(N), b=b, fixed.a=a)
# fit 1PL model
mod <- TAM::tam.mml( dat )
diff --git a/docs/reference/IRT.likelihood.tam.html b/docs/reference/IRT.likelihood.tam.html
index 08ea952..615847a 100644
--- a/docs/reference/IRT.likelihood.tam.html
+++ b/docs/reference/IRT.likelihood.tam.html
@@ -74,7 +74,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/IRT.linearCFA.html b/docs/reference/IRT.linearCFA.html
index 8a632ad..3437e18 100644
--- a/docs/reference/IRT.linearCFA.html
+++ b/docs/reference/IRT.linearCFA.html
@@ -76,7 +76,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/IRT.residuals.html b/docs/reference/IRT.residuals.html
index 4d2d16f..05731ea 100644
--- a/docs/reference/IRT.residuals.html
+++ b/docs/reference/IRT.residuals.html
@@ -76,7 +76,7 @@
TAM
- 4.0-vv
+ 4.1-vv
@@ -183,19 +183,21 @@ See a
See also predict.tam.mml
.
Examples
- #############################################################################
+ if (FALSE) {
+#############################################################################
# EXAMPLE 1: Residuals data.read
#############################################################################
library(sirt)
-data(data.read,package="sirt")
+data(data.read, package="sirt")
dat <- data.read
# for Rasch model
mod <- TAM::tam.mml( dat )
# extract residuals
res <- TAM::IRT.residuals( mod )
-str(res)
+str(res)
+}
diff --git a/docs/reference/IRT.threshold.html b/docs/reference/IRT.threshold.html
index 23bffd6..5cac63e 100644
--- a/docs/reference/IRT.threshold.html
+++ b/docs/reference/IRT.threshold.html
@@ -78,7 +78,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/IRT.truescore.html b/docs/reference/IRT.truescore.html
index 10b7146..d4c271c 100644
--- a/docs/reference/IRT.truescore.html
+++ b/docs/reference/IRT.truescore.html
@@ -77,7 +77,7 @@
TAM
- 4.0-vv
+ 4.1-vv
@@ -157,7 +157,7 @@ Value
true scores \(\tau( \theta ) \).
See also
- See also sirt::truescore.irt
+
See also sirt::truescore.irt
for a conversion function for generalized partial credit models.
Examples
diff --git a/docs/reference/IRTLikelihood.cfa.html b/docs/reference/IRTLikelihood.cfa.html
index 51a07a7..f09ae94 100644
--- a/docs/reference/IRTLikelihood.cfa.html
+++ b/docs/reference/IRTLikelihood.cfa.html
@@ -79,7 +79,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/IRTLikelihood.ctt.html b/docs/reference/IRTLikelihood.ctt.html
index e8ac07a..9888c02 100644
--- a/docs/reference/IRTLikelihood.ctt.html
+++ b/docs/reference/IRTLikelihood.ctt.html
@@ -73,7 +73,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/Scale.html b/docs/reference/Scale.html
index ebdffe9..94d35a4 100644
--- a/docs/reference/Scale.html
+++ b/docs/reference/Scale.html
@@ -72,7 +72,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/TAM-defunct.html b/docs/reference/TAM-defunct.html
index 468e929..6f3b45b 100644
--- a/docs/reference/TAM-defunct.html
+++ b/docs/reference/TAM-defunct.html
@@ -73,7 +73,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/TAM-package.html b/docs/reference/TAM-package.html
index d8dc327..468609b 100644
--- a/docs/reference/TAM-package.html
+++ b/docs/reference/TAM-package.html
@@ -83,7 +83,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/TAM-utilities.html b/docs/reference/TAM-utilities.html
index 4b979a5..d571936 100644
--- a/docs/reference/TAM-utilities.html
+++ b/docs/reference/TAM-utilities.html
@@ -72,7 +72,7 @@
TAM
- 4.0-vv
+ 4.1-vv
@@ -139,7 +139,7 @@ Utility Functions in TAM
## round some columns in a data frame and print this data frame
tam_round_data_frame_print(obji, from=1, to=ncol(obji), digits=3, rownames_null=FALSE)
## copy of CDM::osink
-tam_osink(file, suffix="__SUMMARY.Rout")
+tam_osink(file, suffix=".Rout")
## copy of CDM::csink
tam_csink(file)
diff --git a/docs/reference/WLErel.html b/docs/reference/WLErel.html
index c782616..6a60330 100644
--- a/docs/reference/WLErel.html
+++ b/docs/reference/WLErel.html
@@ -72,7 +72,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/anova.tam.html b/docs/reference/anova.tam.html
index 1834235..ba3b3a7 100644
--- a/docs/reference/anova.tam.html
+++ b/docs/reference/anova.tam.html
@@ -77,7 +77,7 @@
TAM
- 4.0-vv
+ 4.1-vv
@@ -201,7 +201,7 @@ Examp
# EXAMPLE 2: Dataset reading (sirt package): 1- vs. 2-dimensional model
#############################################################################
-data(data.read,package="sirt")
+data(data.read, package="sirt")
# 1-dimensional model
mod1 <- TAM::tam.mml.2pl(resp=data.read )
diff --git a/docs/reference/cfa.extract.itempars.html b/docs/reference/cfa.extract.itempars.html
index 2e6ee5b..de72ca1 100644
--- a/docs/reference/cfa.extract.itempars.html
+++ b/docs/reference/cfa.extract.itempars.html
@@ -76,7 +76,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/data.cqc.html b/docs/reference/data.cqc.html
index 571b567..1f3634b 100644
--- a/docs/reference/data.cqc.html
+++ b/docs/reference/data.cqc.html
@@ -73,7 +73,7 @@
TAM
- 4.0-vv
+ 4.1-vv
@@ -180,7 +180,7 @@
- See the sirt::R2conquest
function
+
See the sirt::R2conquest
function
for running ConQuest software from within R.
See the WrightMap package for functions
connected to reading ConQuest files and creating Wright maps.
@@ -219,16 +219,16 @@
Examp
#------- ConQuest
# estimate model
-cmod01 <- sirt::R2conquest( dat, name="mod01", path.conquest=path.conquest)
+cmod01 <- sirt::R2conquest( dat, name="mod01", path.conquest=path.conquest)
summary(cmod01) # summary output
# read shw file with some terms
-shw01a <- sirt::read.show( "mod01.shw" )
+shw01a <- sirt::read.show( "mod01.shw" )
cmod01$shw.itemparameter
# read person item maps
-pi01a <- sirt::read.pimap( "mod01.shw" )
+pi01a <- sirt::read.pimap( "mod01.shw" )
cmod01$shw.pimap
# read plausible values (npv=10 plausible values)
-pv01a <- sirt::read.pv(pvfile="mod01.pv", npv=10)
+pv01a <- sirt::read.pv(pvfile="mod01.pv", npv=10)
cmod01$person
# read ConQuest model
@@ -256,7 +256,7 @@ Examp
#--- ConQuest
# estimate model
maxK <- max( dat, na.rm=TRUE )
-cmod02a <- sirt::R2conquest( dat, itemcodes=0:maxK, model="item+item*step",
+cmod02a <- sirt::R2conquest( dat, itemcodes=0:maxK, model="item+item*step",
name="mod02a", path.conquest=path.conquest)
summary(cmod02a) # summary output
@@ -290,7 +290,7 @@ Examp
X <- data.cqc03[,"rater",drop=FALSE]
X$rater <- as.numeric(substring( X$rater, 2 )) # convert 'rater' in numeric format
maxK <- max( resp, na.rm=TRUE)
-cmod03a <- sirt::R2conquest( resp, X=X, regression="", model="item+step+rater",
+cmod03a <- sirt::R2conquest( resp, X=X, regression="", model="item+step+rater",
name="mod03a", path.conquest=path.conquest, set.constraints="cases" )
summary(cmod03a) # summary output
diff --git a/docs/reference/data.ctest.html b/docs/reference/data.ctest.html
index cab1246..a958632 100644
--- a/docs/reference/data.ctest.html
+++ b/docs/reference/data.ctest.html
@@ -72,7 +72,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/data.examples.html b/docs/reference/data.examples.html
index 7b36037..235213d 100644
--- a/docs/reference/data.examples.html
+++ b/docs/reference/data.examples.html
@@ -72,7 +72,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/data.fims.Aus.Jpn.html b/docs/reference/data.fims.Aus.Jpn.html
index 3c85d12..30ea196 100644
--- a/docs/reference/data.fims.Aus.Jpn.html
+++ b/docs/reference/data.fims.Aus.Jpn.html
@@ -74,7 +74,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/data.geiser.html b/docs/reference/data.geiser.html
index 33c1f56..2ceac3d 100644
--- a/docs/reference/data.geiser.html
+++ b/docs/reference/data.geiser.html
@@ -73,7 +73,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/data.gpcm.html b/docs/reference/data.gpcm.html
index 3fe2e92..f9f997e 100644
--- a/docs/reference/data.gpcm.html
+++ b/docs/reference/data.gpcm.html
@@ -72,7 +72,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/data.janssen.html b/docs/reference/data.janssen.html
index 7267e3a..94a9ee4 100644
--- a/docs/reference/data.janssen.html
+++ b/docs/reference/data.janssen.html
@@ -72,7 +72,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/data.mc.html b/docs/reference/data.mc.html
index 3e069c7..eb0abc7 100644
--- a/docs/reference/data.mc.html
+++ b/docs/reference/data.mc.html
@@ -73,7 +73,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/data.numeracy.html b/docs/reference/data.numeracy.html
index 54d0e35..8779c23 100644
--- a/docs/reference/data.numeracy.html
+++ b/docs/reference/data.numeracy.html
@@ -73,7 +73,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/data.sim.mfr.html b/docs/reference/data.sim.mfr.html
index 39521f1..ba5364f 100644
--- a/docs/reference/data.sim.mfr.html
+++ b/docs/reference/data.sim.mfr.html
@@ -72,7 +72,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/data.sim.rasch.html b/docs/reference/data.sim.rasch.html
index 8c81da7..67a4deb 100644
--- a/docs/reference/data.sim.rasch.html
+++ b/docs/reference/data.sim.rasch.html
@@ -72,7 +72,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/data.timssAusTwn.html b/docs/reference/data.timssAusTwn.html
index b7adc49..025fe36 100644
--- a/docs/reference/data.timssAusTwn.html
+++ b/docs/reference/data.timssAusTwn.html
@@ -75,7 +75,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/designMatrices.html b/docs/reference/designMatrices.html
index 9839b8a..9f3d452 100644
--- a/docs/reference/designMatrices.html
+++ b/docs/reference/designMatrices.html
@@ -72,7 +72,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/doparse.html b/docs/reference/doparse.html
index e99990b..47aa94f 100644
--- a/docs/reference/doparse.html
+++ b/docs/reference/doparse.html
@@ -83,7 +83,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/index.html b/docs/reference/index.html
index 2dff57c..413e628 100644
--- a/docs/reference/index.html
+++ b/docs/reference/index.html
@@ -71,7 +71,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/lavaanify.IRT.html b/docs/reference/lavaanify.IRT.html
index 50511f3..876c4b6 100644
--- a/docs/reference/lavaanify.IRT.html
+++ b/docs/reference/lavaanify.IRT.html
@@ -89,7 +89,7 @@
TAM
- 4.0-vv
+ 4.1-vv
@@ -197,10 +197,10 @@ See a
diff --git a/docs/reference/msq.itemfit.html b/docs/reference/msq.itemfit.html
index 1b2bc51..7f7e67f 100644
--- a/docs/reference/msq.itemfit.html
+++ b/docs/reference/msq.itemfit.html
@@ -78,7 +78,7 @@
TAM
- 4.0-vv
+ 4.1-vv
@@ -180,7 +180,9 @@ See a
See also eRm::itemfit
or mirt::itemfit
.
Examples
- #############################################################################
+ if (FALSE) {
+
+#############################################################################
# EXAMPLE 1: Simulated data Rasch model
#############################################################################
@@ -194,7 +196,7 @@ Examp
# create some misfitting items
a[c(1,3)] <- c(.5, 1.5 )
# simulate data
-dat <- sirt::sim.raschtype( rnorm(N), b=b, fixed.a=a )
+dat <- sirt::sim.raschtype( rnorm(N), b=b, fixed.a=a )
#*** estimate Rasch model
mod1 <- TAM::tam.mml(resp=dat)
# compute WLEs
@@ -204,7 +206,6 @@ Examp
fit1 <- TAM::msq.itemfit(mod1)
summary( fit1 )
-if (FALSE) {
#--- item fit using simulation in "tam.fit"
fit0 <- TAM::tam.fit( mod1 )
summary(fit0)
@@ -217,7 +218,7 @@ Examp
library(mirt)
mod1b <- mirt::mirt( dat, model=1, itemtype="Rasch", verbose=TRUE )
print(mod1b)
-sirt::mirt.wrapper.coef(mod1b)
+sirt::mirt.wrapper.coef(mod1b)
fmod1b <- mirt::itemfit(mod1b, Theta=as.matrix(wmod1,ncol=1),
Zh=TRUE, X2=FALSE, S_X2=FALSE )
cbind( fit2a$fit_data, fmod1b )
@@ -242,7 +243,6 @@ Examp
# using WLEs
fit2b <- TAM::msq.itemfitWLE( mod1, fitindices )
summary(fit2b)
-}
#############################################################################
# EXAMPLE 2: data.read | fit statistics assessed for testlets
@@ -273,7 +273,6 @@ Examp
res2 <- TAM::msq.itemfitWLE( mod, fitindices )
summary(res2)
-if (FALSE) {
#############################################################################
# EXAMPLE 3: Fit statistics for rater models
#############################################################################
diff --git a/docs/reference/plot.tam.html b/docs/reference/plot.tam.html
index 601d59c..f749019 100644
--- a/docs/reference/plot.tam.html
+++ b/docs/reference/plot.tam.html
@@ -73,7 +73,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/plotDevianceTAM.html b/docs/reference/plotDevianceTAM.html
index 96e585b..19ad667 100644
--- a/docs/reference/plotDevianceTAM.html
+++ b/docs/reference/plotDevianceTAM.html
@@ -72,7 +72,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/predict.html b/docs/reference/predict.html
index ab76cd1..1a2df9b 100644
--- a/docs/reference/predict.html
+++ b/docs/reference/predict.html
@@ -75,7 +75,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/tam.ctt.html b/docs/reference/tam.ctt.html
index 67f0784..8e77972 100644
--- a/docs/reference/tam.ctt.html
+++ b/docs/reference/tam.ctt.html
@@ -73,7 +73,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/tam.fa.html b/docs/reference/tam.fa.html
index 61bc60f..3404b67 100644
--- a/docs/reference/tam.fa.html
+++ b/docs/reference/tam.fa.html
@@ -75,7 +75,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/tam.fit.html b/docs/reference/tam.fit.html
index 1ccab65..f52c4c7 100644
--- a/docs/reference/tam.fit.html
+++ b/docs/reference/tam.fit.html
@@ -74,7 +74,7 @@
TAM
- 4.0-vv
+ 4.1-vv
@@ -219,8 +219,8 @@ See a
for models fitted with JML.
See tam.personfit
for computing person fit statistics.
Item fit and person fit based on estimated person parameters can also be
-calculated using the sirt::pcm.fit
function
-in the sirt package (see Example 1 and Example 2).
+calculated using the sirt::pcm.fit
function
+in the sirt package (see Example 1 and Example 2).
Examples
#############################################################################
@@ -240,6 +240,8 @@ Examp
## 3 I3 1.022 0.330 0.185 1.012 0.366 0.179
## 4 I4 1.047 0.720 0.118 1.054 1.650 0.025
+if (FALSE) {
+
#--------
# infit and oufit based on estimated WLEs
library(sirt)
@@ -249,11 +251,10 @@ Examp
# extract item parameters
b1 <- - mod1$AXsi[, -1 ]
# assess item fit and person fit
-fit1a <- sirt::pcm.fit(b=b1, theta=wle$theta, data.sim.rasch )
+fit1a <- sirt::pcm.fit(b=b1, theta=wle$theta, data.sim.rasch )
fit1a$item # item fit statistic
fit1a$person # person fit statistic
-if (FALSE) {
#############################################################################
# EXAMPLE 2: Partial credit model data.gpcm
#############################################################################
@@ -278,7 +279,7 @@ Examp
# extract item parameters
b1 <- - mod2$AXsi[, -1 ]
# assess fit
-fit1a <- sirt::pcm.fit(b=b1, theta=wle$theta, dat)
+fit1a <- sirt::pcm.fit(b=b1, theta=wle$theta, dat)
fit1a$item
#############################################################################
@@ -334,7 +335,7 @@ Examp
# create some misfitting items
a[c(1,3)] <- c(.5, 1.5 )
# simulate data
-dat <- sirt::sim.raschtype( rnorm(N), b=b, fixed.a=a )
+dat <- sirt::sim.raschtype( rnorm(N), b=b, fixed.a=a )
#*** estimate Rasch model
mod1 <- TAM::tam.mml(resp=dat)
#*** assess item fit by infit and outfit statistic
@@ -346,7 +347,7 @@ Examp
library(sirt)
mod1c <- mirt::mirt( dat, model=1, itemtype="Rasch", verbose=TRUE)
print(mod1c) # model summary
-sirt::mirt.wrapper.coef(mod1c) # estimated parameters
+sirt::mirt.wrapper.coef(mod1c) # estimated parameters
fit1c <- mirt::itemfit(mod1c, method="EAP") # model fit in mirt package
# compare results of TAM and mirt
dfr <- cbind( "TAM"=fit1, "mirt"=fit1c[,-c(1:2)] )
diff --git a/docs/reference/tam.jml.html b/docs/reference/tam.jml.html
index aeb5079..1d4df33 100644
--- a/docs/reference/tam.jml.html
+++ b/docs/reference/tam.jml.html
@@ -74,7 +74,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/tam.latreg.html b/docs/reference/tam.latreg.html
index eee06f9..7e382f3 100644
--- a/docs/reference/tam.latreg.html
+++ b/docs/reference/tam.latreg.html
@@ -78,7 +78,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/tam.linking.html b/docs/reference/tam.linking.html
index 17d7547..c94dd25 100644
--- a/docs/reference/tam.linking.html
+++ b/docs/reference/tam.linking.html
@@ -78,7 +78,7 @@
TAM
- 4.0-vv
+ 4.1-vv
@@ -304,10 +304,9 @@ See a
+
See also the sirt::linking.haberman
,
+sirt::invariance.alignment
and sirt::linking.haebara
functions
+in the sirt package.
Examples
if (FALSE) {
@@ -453,9 +452,9 @@ Examp
I <- 30 # number of items
b <- seq(-2,2, length=I)
# data for group 1
-dat1 <- sirt::sim.raschtype( rnorm(N, mean=0, sd=1), b=b )
+dat1 <- sirt::sim.raschtype( rnorm(N, mean=0, sd=1), b=b )
# data for group 2
-dat2 <- sirt::sim.raschtype( rnorm(N, mean=1, sd=.6), b=b )
+dat2 <- sirt::sim.raschtype( rnorm(N, mean=1, sd=.6), b=b )
# fit group 1
mod1 <- TAM::tam.mml.2pl( resp=dat1 )
diff --git a/docs/reference/tam.mml.3pl.html b/docs/reference/tam.mml.3pl.html
index 05170c6..3d6c15e 100644
--- a/docs/reference/tam.mml.3pl.html
+++ b/docs/reference/tam.mml.3pl.html
@@ -74,7 +74,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/tam.mml.html b/docs/reference/tam.mml.html
index 9742f50..c746446 100644
--- a/docs/reference/tam.mml.html
+++ b/docs/reference/tam.mml.html
@@ -79,7 +79,7 @@
TAM
- 4.0-vv
+ 4.1-vv
@@ -642,7 +642,7 @@ See a
Standard errors are estimated by a rather crude (but quick) approximation.
Use tam.se
for improved standard errors.
For model comparisons see anova.tam
.
-See sirt::tam2mirt
for converting
+
See sirt::tam2mirt
for converting
tam
objects into objects of class
mirt::mirt
in the mirt package.
@@ -2072,7 +2072,7 @@ Examp
I <- 100 # number of items
set.seed(987)
# simulate data according to the Rasch model
-dat <- sirt::sim.raschtype( stats::rnorm(N), b=seq(-2,2,len=I) )
+dat <- sirt::sim.raschtype( stats::rnorm(N), b=seq(-2,2,len=I) )
# estimate models
mod1n <- TAM::tam.mml( resp=dat, control=list( acceleration="none") ) # no acceler.
mod1y <- TAM::tam.mml( resp=dat, control=list( acceleration="Yu") ) # Yu acceler.
diff --git a/docs/reference/tam.modelfit.html b/docs/reference/tam.modelfit.html
index a987e49..356538e 100644
--- a/docs/reference/tam.modelfit.html
+++ b/docs/reference/tam.modelfit.html
@@ -84,7 +84,7 @@
TAM
- 4.0-vv
+ 4.1-vv
@@ -333,7 +333,7 @@ Examp
I <- 20 # number of items
# simulate responses
library(sirt)
-dat <- sirt::sim.raschtype( rnorm(N), b=seq(-1.5,1.5,len=I) )
+dat <- sirt::sim.raschtype( stats::rnorm(N), b=seq(-1.5,1.5,len=I) )
#*** estimation
mod1 <- TAM::tam.mml( dat )
summary(dat)
diff --git a/docs/reference/tam.np.html b/docs/reference/tam.np.html
index 894ac64..be6e95d 100644
--- a/docs/reference/tam.np.html
+++ b/docs/reference/tam.np.html
@@ -79,7 +79,7 @@
TAM
- 4.0-vv
+ 4.1-vv
@@ -361,7 +361,7 @@ Examp
a <- rep(1,I)
a[c(3,8)] <- c(.5, 2)
theta <- stats::rnorm(N, sd=1)
-dat <- sirt::sim.raschtype(theta, b=b, fixed.a=a)
+dat <- sirt::sim.raschtype(theta, b=b, fixed.a=a)
#- 1PL model
mod1 <- TAM::tam.mml(dat)
diff --git a/docs/reference/tam.personfit.html b/docs/reference/tam.personfit.html
index 9a6406d..5be8ca6 100644
--- a/docs/reference/tam.personfit.html
+++ b/docs/reference/tam.personfit.html
@@ -72,7 +72,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/tam.pv.html b/docs/reference/tam.pv.html
index 3e59a5e..97f1871 100644
--- a/docs/reference/tam.pv.html
+++ b/docs/reference/tam.pv.html
@@ -84,7 +84,7 @@
TAM
- 4.0-vv
+ 4.1-vv
@@ -573,7 +573,7 @@ Examp
theta <- .5*X[,1] + .4*X[,2] + rnorm( N, sd=.5 )
# simulate item responses
itemdiff <- seq( -2, 2, length=I) # item difficulties
-dat <- sirt::sim.raschtype( theta, b=itemdiff )
+dat <- sirt::sim.raschtype( theta, b=itemdiff )
#***********************
#*** Model 0: Regression model with true variables
diff --git a/docs/reference/tam.se.html b/docs/reference/tam.se.html
index 219cd56..d20d6ce 100644
--- a/docs/reference/tam.se.html
+++ b/docs/reference/tam.se.html
@@ -73,7 +73,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/tam.threshold.html b/docs/reference/tam.threshold.html
index 41969de..01e3524 100644
--- a/docs/reference/tam.threshold.html
+++ b/docs/reference/tam.threshold.html
@@ -73,7 +73,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/tam.wle.html b/docs/reference/tam.wle.html
index 45c9572..baee2b6 100644
--- a/docs/reference/tam.wle.html
+++ b/docs/reference/tam.wle.html
@@ -76,7 +76,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/tam_NA_pattern.html b/docs/reference/tam_NA_pattern.html
index d17ebdc..38e23aa 100644
--- a/docs/reference/tam_NA_pattern.html
+++ b/docs/reference/tam_NA_pattern.html
@@ -73,7 +73,7 @@
TAM
- 4.0-vv
+ 4.1-vv
@@ -134,7 +134,7 @@ Arg
Value
-
List containing identifiers and indices
+ List containing pattern identifiers and indices
Examples
#############################################################################
@@ -147,6 +147,7 @@ Examp
res <- TAM::tam_NA_pattern(dat)
str(res)
+if (FALSE) {
#############################################################################
# EXAMPLE 2: Item response patterns
#############################################################################
@@ -155,7 +156,8 @@ Examp
dat <- data.read
res <- TAM::tam_01_pattern(dat)
-str(res)
+str(res)
+}
diff --git a/docs/reference/tam_irf_3pl.html b/docs/reference/tam_irf_3pl.html
index c4796f0..2cab744 100644
--- a/docs/reference/tam_irf_3pl.html
+++ b/docs/reference/tam_irf_3pl.html
@@ -73,7 +73,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/tamaan.html b/docs/reference/tamaan.html
index 1f33048..7f16fd0 100644
--- a/docs/reference/tamaan.html
+++ b/docs/reference/tamaan.html
@@ -76,7 +76,7 @@
TAM
- 4.0-vv
+ 4.1-vv
@@ -199,7 +199,9 @@ See a
for more examples.
Examples
- #############################################################################
+ if (FALSE) {
+
+#############################################################################
# EXAMPLE 1: Examples dichotomous data data.read
#############################################################################
@@ -221,7 +223,6 @@ Examp
mod1 <- TAM::tamaan( tammodel, resp=dat)
summary(mod1)
-if (FALSE) {
#*********************************************************************
#*** Model 2: 2PL model with some selected items
diff --git a/docs/reference/tamaanify.html b/docs/reference/tamaanify.html
index 65d6718..3e0d40d 100644
--- a/docs/reference/tamaanify.html
+++ b/docs/reference/tamaanify.html
@@ -75,7 +75,7 @@
TAM
- 4.0-vv
+ 4.1-vv
@@ -266,7 +266,9 @@ See a
lavaanify.IRT
Examples
- #############################################################################
+ if (FALSE) {
+
+#############################################################################
# EXAMPLE 1: Examples dichotomous data data.read
#############################################################################
@@ -315,7 +317,6 @@ Examp
out <- TAM::tamaanify( tammodel, resp=dat)
str(out$E) # E design matrix for estimation with tam.mml.3pl function
-if (FALSE) {
#*********************************************************************
#*** Model 3: Linear constraints for item intercepts and item loadings
tammodel <- "
diff --git a/docs/reference/tampv2datalist.html b/docs/reference/tampv2datalist.html
index 6e0c152..dd2f14c 100644
--- a/docs/reference/tampv2datalist.html
+++ b/docs/reference/tampv2datalist.html
@@ -75,7 +75,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/docs/reference/weighted_Stats.html b/docs/reference/weighted_Stats.html
index 5623edd..b13bb41 100644
--- a/docs/reference/weighted_Stats.html
+++ b/docs/reference/weighted_Stats.html
@@ -75,7 +75,7 @@
TAM
- 4.0-vv
+ 4.1-vv
diff --git a/inst/NEWS b/inst/NEWS
index e2f78c7..346adf8 100644
--- a/inst/NEWS
+++ b/inst/NEWS
@@ -41,20 +41,28 @@ http://www.edmeasurementsurveys.com/TAM/Tutorials/
-
-------------------------------------------------------------
-VERSIONS TAM 4.0 | 2021-06-25 | Last: TAM 4.0-1
+VERSIONS TAM 4.1 | 2022-05-15 | Last: TAM 4.1-1
-------------------------------------------------------------
xxx * ...
+
DATA * included/modified datasets: ---
EXAMP * included/modified examples: ---
+-------------------------------------------------------------
+VERSIONS TAM 4.0 | 2022-05-13 | Last: TAM 4.0-16
+-------------------------------------------------------------
+NOTE * changed default output file name suffix in tam_osink()
+NOTE * new CRAN release because of recent removal of the
+ CDM package from CRAN
+DATA * included/modified datasets: ---
+EXAMP * included/modified examples: ---
-------------------------------------------------------------
VERSIONS TAM 3.7 | 2021-06-24 | Last: TAM 3.7-16
diff --git a/man/IRT.drawPV.Rd b/man/IRT.drawPV.Rd
index d0599ea..14a82a0 100644
--- a/man/IRT.drawPV.Rd
+++ b/man/IRT.drawPV.Rd
@@ -1,5 +1,5 @@
%% File Name: IRT.drawPV.Rd
-%% File Version: 0.13
+%% File Version: 0.141
\name{IRT.drawPV}
\alias{IRT.drawPV}
@@ -62,7 +62,7 @@ Matrix with plausible values
#############################################################################
library(sirt)
-data(data.read,package="sirt")
+data(data.read, package="sirt")
dat <- data.read
# fit Rasch model
diff --git a/man/IRT.residuals.Rd b/man/IRT.residuals.Rd
index 70b7c72..cd9f286 100644
--- a/man/IRT.residuals.Rd
+++ b/man/IRT.residuals.Rd
@@ -1,5 +1,5 @@
%% File Name: IRT.residuals.Rd
-%% File Version: 0.17
+%% File Version: 0.182
\name{IRT.residuals}
\alias{IRT.residuals}
@@ -92,12 +92,13 @@ See also \code{\link[TAM:predict.tam.mml]{predict.tam.mml}}.
\examples{
+\dontrun{
#############################################################################
# EXAMPLE 1: Residuals data.read
#############################################################################
library(sirt)
-data(data.read,package="sirt")
+data(data.read, package="sirt")
dat <- data.read
# for Rasch model
@@ -106,6 +107,7 @@ mod <- TAM::tam.mml( dat )
res <- TAM::IRT.residuals( mod )
str(res)
}
+}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
%% \keyword{Residuals}
diff --git a/man/IRT.truescore.Rd b/man/IRT.truescore.Rd
index 69ac7a9..f1cc23a 100644
--- a/man/IRT.truescore.Rd
+++ b/man/IRT.truescore.Rd
@@ -1,5 +1,5 @@
%% File Name: IRT.truescore.Rd
-%% File Version: 0.21
+%% File Version: 0.221
\name{IRT.truescore}
\alias{IRT.truescore}
@@ -52,7 +52,7 @@ true scores \eqn{\tau( \theta ) }.
%% ~Make other sections like Warning with \section{Warning }{....} ~
\seealso{
-See also \code{\link[sirt:truescore.irt]{sirt::truescore.irt}}
+See also \code{sirt::truescore.irt}
for a conversion function for generalized partial credit models.
}
diff --git a/man/TAM-utilities.Rd b/man/TAM-utilities.Rd
index 909bf8e..3a474fe 100644
--- a/man/TAM-utilities.Rd
+++ b/man/TAM-utilities.Rd
@@ -1,5 +1,5 @@
%% File Name: TAM-utilities.Rd
-%% File Version: 0.666
+%% File Version: 0.667
\name{TAM-utilities}
\alias{TAM-utilities}
@@ -66,7 +66,7 @@ tam_round_data_frame(obji, from=1, to=ncol(obji), digits=3, rownames_null=FALSE)
## round some columns in a data frame and print this data frame
tam_round_data_frame_print(obji, from=1, to=ncol(obji), digits=3, rownames_null=FALSE)
## copy of CDM::osink
-tam_osink(file, suffix="__SUMMARY.Rout")
+tam_osink(file, suffix=".Rout")
## copy of CDM::csink
tam_csink(file)
diff --git a/man/anova.tam.Rd b/man/anova.tam.Rd
index 383a54c..1202a11 100644
--- a/man/anova.tam.Rd
+++ b/man/anova.tam.Rd
@@ -1,5 +1,5 @@
%% File Name: anova.tam.Rd
-%% File Version: 2.33
+%% File Version: 2.341
\name{anova-logLik}
\alias{anova.tam}
@@ -116,7 +116,7 @@ anova( mod1, mod2 )
# EXAMPLE 2: Dataset reading (sirt package): 1- vs. 2-dimensional model
#############################################################################
-data(data.read,package="sirt")
+data(data.read, package="sirt")
# 1-dimensional model
mod1 <- TAM::tam.mml.2pl(resp=data.read )
diff --git a/man/data.cqc.Rd b/man/data.cqc.Rd
index b7cff5f..4931464 100644
--- a/man/data.cqc.Rd
+++ b/man/data.cqc.Rd
@@ -99,7 +99,7 @@ variables of following format
\seealso{
-See the \code{\link[sirt:R2conquest]{sirt::R2conquest}} function
+See the \code{sirt::R2conquest} function
for running ConQuest software from within \R.
See the \pkg{\link[WrightMap:WrightMap]{WrightMap}} package for functions
diff --git a/man/lavaanify.IRT.Rd b/man/lavaanify.IRT.Rd
index a4c582d..8d9cc54 100644
--- a/man/lavaanify.IRT.Rd
+++ b/man/lavaanify.IRT.Rd
@@ -1,5 +1,5 @@
%% File Name: lavaanify.IRT.Rd
-%% File Version: 1.40
+%% File Version: 1.411
\name{lavaanify.IRT}
\alias{lavaanify.IRT}
@@ -85,11 +85,11 @@ syntax if nonlinear factors are used.}
\code{\link[lavaan:lavaanify]{lavaan::lavaanify}}
-See \code{\link[sirt:tam2mirt]{sirt::tam2mirt}} for
+See \code{sirt::tam2mirt} for
converting objects of class \code{tam} into \code{mirt}
objects.
-See \code{\link[sirt:lavaan2mirt]{sirt::lavaan2mirt}}
+See \code{sirt::lavaan2mirt}
for estimating models in the \pkg{mirt} package using \code{lavaan} syntax.
See \code{\link{doparse}} for the \code{DO} and \code{DO2} statements.
diff --git a/man/msq.itemfit.Rd b/man/msq.itemfit.Rd
index ef90fec..9707423 100644
--- a/man/msq.itemfit.Rd
+++ b/man/msq.itemfit.Rd
@@ -1,5 +1,5 @@
%% File Name: msq.itemfit.Rd
-%% File Version: 0.39
+%% File Version: 0.402
\name{msq.itemfit}
@@ -85,6 +85,8 @@ See also \code{eRm::itemfit} or \code{\link[mirt:itemfit]{mirt::itemfit}}.
\examples{
+\dontrun{
+
#############################################################################
# EXAMPLE 1: Simulated data Rasch model
#############################################################################
@@ -109,7 +111,6 @@ wmod1 <- TAM::tam.wle(mod1)$theta
fit1 <- TAM::msq.itemfit(mod1)
summary( fit1 )
-\dontrun{
#--- item fit using simulation in "tam.fit"
fit0 <- TAM::tam.fit( mod1 )
summary(fit0)
@@ -147,7 +148,6 @@ summary(fit2)
# using WLEs
fit2b <- TAM::msq.itemfitWLE( mod1, fitindices )
summary(fit2b)
-}
#############################################################################
# EXAMPLE 2: data.read | fit statistics assessed for testlets
@@ -178,7 +178,6 @@ summary(res1)
res2 <- TAM::msq.itemfitWLE( mod, fitindices )
summary(res2)
-\dontrun{
#############################################################################
# EXAMPLE 3: Fit statistics for rater models
#############################################################################
diff --git a/man/tam.fit.Rd b/man/tam.fit.Rd
index e9ca661..dea9ca9 100644
--- a/man/tam.fit.Rd
+++ b/man/tam.fit.Rd
@@ -1,5 +1,5 @@
%% File Name: tam.fit.Rd
-%% File Version: 2.562
+%% File Version: 2.564
\name{tam.fit}
@@ -110,8 +110,8 @@ for models fitted with JML.
See \code{\link{tam.personfit}} for computing person fit statistics.
Item fit and person fit based on estimated person parameters can also be
-calculated using the \code{\link[sirt:pcm.fit]{sirt::pcm.fit}} function
-in the \pkg{sirt} package (see Example 1 and Example 2).
+calculated using the \code{sirt::pcm.fit} function
+in the \bold{sirt} package (see Example 1 and Example 2).
}
%% ~~objects to See Also as \code{\link{help}}, ~~~
@@ -133,6 +133,8 @@ summary(fit1)
## 3 I3 1.022 0.330 0.185 1.012 0.366 0.179
## 4 I4 1.047 0.720 0.118 1.054 1.650 0.025
+\dontrun{
+
#--------
# infit and oufit based on estimated WLEs
library(sirt)
@@ -146,7 +148,6 @@ fit1a <- sirt::pcm.fit(b=b1, theta=wle$theta, data.sim.rasch )
fit1a$item # item fit statistic
fit1a$person # person fit statistic
-\dontrun{
#############################################################################
# EXAMPLE 2: Partial credit model data.gpcm
#############################################################################
diff --git a/man/tam.latreg.Rd b/man/tam.latreg.Rd
index 6881f92..76bf1d8 100644
--- a/man/tam.latreg.Rd
+++ b/man/tam.latreg.Rd
@@ -1,5 +1,5 @@
%% File Name: tam.latreg.Rd
-%% File Version: 0.31
+%% File Version: 0.321
\name{tam.latreg}
\alias{tam.latreg}
@@ -146,7 +146,7 @@ See also \code{\link{tam.pv}} for plausible value imputation.
\dontrun{
#############################################################################
# EXAMPLE 1: Unidimensional latent regression model with fitted IRT model in
-# sirt package
+# the sirt package
#############################################################################
library(sirt)
diff --git a/man/tam.linking.Rd b/man/tam.linking.Rd
index 8649382..498154c 100644
--- a/man/tam.linking.Rd
+++ b/man/tam.linking.Rd
@@ -1,5 +1,5 @@
%% File Name: tam.linking.Rd
-%% File Version: 0.625
+%% File Version: 0.627
\name{tam.linking}
\alias{tam.linking}
@@ -153,10 +153,9 @@ Linking or equating of item response models can be also conducted with \pkg{plin
(Weeks, 2010), \pkg{equate}, \pkg{equateIRT} (Battauz, 2015), \pkg{equateMultiple},
\pkg{kequate} and \pkg{irteQ} packages.
-See also the \code{\link[sirt:linking.haberman]{sirt::linking.haberman}},
-\code{\link[sirt:invariance.alignment]{sirt::invariance.alignment}} and
-\code{\link[sirt:linking.haebara]{sirt::linking.haebara}} functions
-in the \pkg{sirt} package.
+See also the \code{sirt::linking.haberman},
+\code{sirt::invariance.alignment} and \code{sirt::linking.haebara} functions
+in the \bold{sirt} package.
}
\examples{
diff --git a/man/tam.mml.Rd b/man/tam.mml.Rd
index 3343d6c..0fe0517 100644
--- a/man/tam.mml.Rd
+++ b/man/tam.mml.Rd
@@ -1,5 +1,5 @@
%% File Name: tam.mml.Rd
-%% File Version: 2.989
+%% File Version: 2.991
\name{tam.mml}
@@ -589,7 +589,7 @@ Use \code{\link{tam.se}} for improved standard errors.
For model comparisons see \code{\link{anova.tam}}.
-See \code{\link[sirt:tam2mirt]{sirt::tam2mirt}} for converting
+See \code{sirt::tam2mirt} for converting
\code{tam} objects into objects of class
\code{\link[mirt:mirt]{mirt::mirt}} in the \pkg{mirt} package.
}
diff --git a/man/tam.modelfit.Rd b/man/tam.modelfit.Rd
index 83f9fbb..a15cc80 100644
--- a/man/tam.modelfit.Rd
+++ b/man/tam.modelfit.Rd
@@ -1,5 +1,5 @@
%% File Name: tam.modelfit.Rd
-%% File Version: 2.384
+%% File Version: 2.385
\name{tam.modelfit}
\alias{tam.modelfit}
@@ -245,7 +245,7 @@ N <- 1000 # number of persons
I <- 20 # number of items
# simulate responses
library(sirt)
-dat <- sirt::sim.raschtype( rnorm(N), b=seq(-1.5,1.5,len=I) )
+dat <- sirt::sim.raschtype( stats::rnorm(N), b=seq(-1.5,1.5,len=I) )
#*** estimation
mod1 <- TAM::tam.mml( dat )
summary(dat)
diff --git a/man/tam_NA_pattern.Rd b/man/tam_NA_pattern.Rd
index ddef46d..7a7dcfc 100644
--- a/man/tam_NA_pattern.Rd
+++ b/man/tam_NA_pattern.Rd
@@ -1,5 +1,5 @@
%% File Name: tam_NA_pattern.Rd
-%% File Version: 0.05
+%% File Version: 0.062
\name{tam_NA_pattern}
\alias{tam_NA_pattern}
@@ -22,9 +22,7 @@ tam_01_pattern(x)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
-\item{x}{
-Matrix or data frame
-}
+\item{x}{Matrix or data frame}
}
@@ -34,7 +32,7 @@ Matrix or data frame
\value{
-List containing identifiers and indices
+List containing pattern identifiers and indices
}
%\references{
@@ -65,6 +63,7 @@ dat <- data.sim.rasch.missing
res <- TAM::tam_NA_pattern(dat)
str(res)
+\dontrun{
#############################################################################
# EXAMPLE 2: Item response patterns
#############################################################################
@@ -75,6 +74,7 @@ dat <- data.read
res <- TAM::tam_01_pattern(dat)
str(res)
}
+}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
% \keyword{DO statements}
diff --git a/man/tamaan.Rd b/man/tamaan.Rd
index 45a0af8..dd4018f 100644
--- a/man/tamaan.Rd
+++ b/man/tamaan.Rd
@@ -1,5 +1,5 @@
%% File Name: tamaan.Rd
-%% File Version: 0.56
+%% File Version: 0.571
\name{tamaan}
\alias{tamaan}
@@ -101,6 +101,8 @@ for more examples.
\examples{
+\dontrun{
+
#############################################################################
# EXAMPLE 1: Examples dichotomous data data.read
#############################################################################
@@ -123,7 +125,6 @@ ITEM TYPE:
mod1 <- TAM::tamaan( tammodel, resp=dat)
summary(mod1)
-\dontrun{
#*********************************************************************
#*** Model 2: 2PL model with some selected items
diff --git a/man/tamaanify.Rd b/man/tamaanify.Rd
index 263e11e..4499346 100644
--- a/man/tamaanify.Rd
+++ b/man/tamaanify.Rd
@@ -1,5 +1,5 @@
%% File Name: tamaanify.Rd
-%% File Version: 0.553
+%% File Version: 0.554
\name{tamaanify}
\alias{tamaanify}
@@ -195,6 +195,8 @@ are included in \code{\link{tam.mml}} and \code{\link{tam.mml.3pl}}.
\examples{
+\dontrun{
+
#############################################################################
# EXAMPLE 1: Examples dichotomous data data.read
#############################################################################
@@ -244,7 +246,6 @@ LAVAAN MODEL:
out <- TAM::tamaanify( tammodel, resp=dat)
str(out$E) # E design matrix for estimation with tam.mml.3pl function
-\dontrun{
#*********************************************************************
#*** Model 3: Linear constraints for item intercepts and item loadings
tammodel <- "
diff --git a/src/RcppExports.cpp b/src/RcppExports.cpp
index fe9266a..e4bf88d 100644
--- a/src/RcppExports.cpp
+++ b/src/RcppExports.cpp
@@ -1,5 +1,5 @@
//// File Name: RcppExports.cpp
-//// File Version: 4.000001
+//// File Version: 4.001001
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
@@ -7,6 +7,11 @@
using namespace Rcpp; using namespace arma;
+#ifdef RCPP_USE_GLOBAL_ROSTREAM
+Rcpp::Rostream& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
+Rcpp::Rostream& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
+#endif
+
// tam_rcpp_calc_exp
Rcpp::List tam_rcpp_calc_exp(int NP, Rcpp::NumericVector rprobs, Rcpp::NumericVector A, Rcpp::NumericMatrix INDEXIPNO, Rcpp::NumericVector INDEXIPLIST2, Rcpp::NumericVector ESTXSIINDEX, int C, Rcpp::NumericMatrix ITEMWT, int NR, int TP);
RcppExport SEXP _TAM_tam_rcpp_calc_exp(SEXP NPSEXP, SEXP rprobsSEXP, SEXP ASEXP, SEXP INDEXIPNOSEXP, SEXP INDEXIPLIST2SEXP, SEXP ESTXSIINDEXSEXP, SEXP CSEXP, SEXP ITEMWTSEXP, SEXP NRSEXP, SEXP TPSEXP) {
diff --git a/src/init.c b/src/init.c
index c4c9516..a1d33ad 100644
--- a/src/init.c
+++ b/src/init.c
@@ -1,5 +1,5 @@
//// File Name: init.c
-//// File Version: 4.000001
+//// File Version: 4.001001
#include
#include
#include // for NULL
diff --git a/src/tam_rcpp_mml_2pl.cpp b/src/tam_rcpp_mml_2pl.cpp
index 4c1951b..9d0f528 100644
--- a/src/tam_rcpp_mml_2pl.cpp
+++ b/src/tam_rcpp_mml_2pl.cpp
@@ -1,5 +1,5 @@
//// File Name: tam_rcpp_mml_2pl.cpp
-//// File Version: 0.515
+//// File Version: 0.516
#include
@@ -38,7 +38,7 @@ Rcpp::List tam_rcpp_mml_2pl_mstep_item_slopes_suffstat( Rcpp::NumericVector rpro
double temp1=0;
double temp2=0;
double probs_temp=0;
- if ( ( irtmodel[0] == "GPCM" ) | ( irtmodel[0] == "GPCM.design" ) ){
+ if ( ( irtmodel[0] == "GPCM" ) || ( irtmodel[0] == "GPCM.design" ) ){
for (int tt=0; tt
@@ -121,7 +121,7 @@ Rcpp::List tam_rcpp_modelfit_counts( Rcpp::NumericMatrix resp0,
hwtii[tt] = hwtiifull[tt];
//**** expected counts
for (int nn=0;nn