Skip to content

Commit

Permalink
4.2-1
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderrobitzsch committed Aug 29, 2022
1 parent ec259f7 commit 7fd7423
Show file tree
Hide file tree
Showing 96 changed files with 198 additions and 175 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: TAM
Type: Package
Title: Test Analysis Modules
Version: 4.1-1
Date: 2022-05-15 09:03:38
Version: 4.2-1
Date: 2022-08-29 11:02:47
Author:
Alexander Robitzsch [aut,cre] (<https://orcid.org/0000-0002-8226-3132>),
Thomas Kiefer [aut],
Expand Down
4 changes: 2 additions & 2 deletions R/IRT.informationCurve.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## File Name: IRT.informationCurve.R
## File Version: 9.212
## File Version: 9.213



Expand Down Expand Up @@ -59,7 +59,7 @@ informationCurves_mml <- function( object, h=.0001,
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
p2 <- do.call( what=fct, args=args2 )$rprobs
p0a <- p0
p0[ is.na(p0) ] <- 0
p1[ is.na(p1) ] <- 0
Expand Down
2 changes: 1 addition & 1 deletion R/RcppExports.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## File Name: RcppExports.R
## File Version: 4.001001
## File Version: 4.002001
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

Expand Down
5 changes: 3 additions & 2 deletions R/summary.tam.jml.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## File Name: summary.tam.jml.R
## File Version: 9.258
## File Version: 9.260


#***** summary for tam object
Expand Down Expand Up @@ -53,7 +53,8 @@ summary.tam.jml <- function( object, file=NULL, ...)
cat(sdisplay)
cat("Item Parameters -A*Xsi\n")
obji <- object$item1
tam_round_data_frame_print(obji=obji, from=2, to=ncol(obji), digits=3, rownames_null=TRUE)
tam_round_data_frame_print(obji=obji, from=2, to=ncol(obji), digits=3,
rownames_null=TRUE)

#** close sink
tam_csink(file=file)
Expand Down
14 changes: 9 additions & 5 deletions R/summary_tam_print_latreg_stand.R
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
## File Name: summary_tam_print_latreg_stand.R
## File Version: 0.02
## File Version: 0.04

summary_tam_print_latreg_stand <- function(object, digits_stand=4)
{
if ( ! is.null( object$latreg_stand ) ){
cat("------------------------------------------------------------\n")
cat("Standardized Coefficients\n")
tam_round_data_frame_print(obji=object$latreg_stand$beta_stand, digits=digits_stand, from=3)
tam_round_data_frame_print(obji=object$latreg_stand$beta_stand,
digits=digits_stand, from=3)
cat("\n** Explained Variance R^2\n")
tam_round_data_frame_print(obji=object$latreg_stand$R2_theta, digits=digits_stand)
tam_round_data_frame_print(obji=object$latreg_stand$R2_theta,
digits=digits_stand)
cat("** SD Theta\n")
tam_round_data_frame_print(obji=object$latreg_stand$sd_theta, digits=digits_stand)
tam_round_data_frame_print(obji=object$latreg_stand$sd_theta,
digits=digits_stand)
cat("** SD Predictors\n")
tam_round_data_frame_print(obji=object$latreg_stand$sd_x, digits=digits_stand)
tam_round_data_frame_print(obji=object$latreg_stand$sd_x,
digits=digits_stand)
}
}
11 changes: 7 additions & 4 deletions R/summary_tamaan_3pl_intro.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## File Name: summary_tamaan_3pl_intro.R
## File Version: 9.27
## File Version: 9.282


################################################
Expand All @@ -25,14 +25,17 @@ summary_tamaan_3pl_intro <- function(object){
"Normal Distribution", "Discrete Distribution" ), "\n")
if (object$skillspace=="normal"){
if (ctr$snodes==0){
cat("Numeric integration with", dim(object$theta)[1], "integration points\n")
cat("Numeric integration with", dim(object$theta)[1],
"integration points\n")
}
if (ctr$snodes>0){
if (ctr$QMC){
cat("Quasi Monte Carlo integration with", dim(object$theta)[1], "integration points\n")
cat("Quasi Monte Carlo integration with", dim(object$theta)[1],
"integration points\n")
}
if (! ctr$QMC){
cat("Monte Carlo integration with", dim(object$theta)[1], "integration points\n")
cat("Monte Carlo integration with", dim(object$theta)[1],
"integration points\n")
}
}
}
Expand Down
7 changes: 4 additions & 3 deletions R/tam.cb.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## File Name: tam.cb.R
## File Version: 0.16
## File Version: 0.172



Expand Down Expand Up @@ -98,8 +98,9 @@ tam.cb <- function( dat, wlescore=NULL, group=NULL, max_ncat=30, progress=TRUE,
if (l1 < max_ncat){
wt <- weighted_table(v2, w=wgt1)
wt <- wt / sum(wt)
dfr.gg$freq[ii] <- paste0( " ", paste0( paste0( names(wt), " : ", round(wt,digits_freq)),
collapse=" # " ) )
dfr.gg$freq[ii] <- paste0( " ", paste0(
paste0( names(wt), " : ", round(wt,digits_freq)),
collapse=" # " ) )
}
if ( ii %in% prg){
cat("-")
Expand Down
6 changes: 3 additions & 3 deletions R/tam.jml.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## File Name: tam.jml.R
## File Version: 9.365
## File Version: 9.367


tam.jml <- function( resp, group=NULL, adj=.3, disattenuate=FALSE,
Expand Down Expand Up @@ -28,8 +28,8 @@ tam.jml <- function( resp, group=NULL, adj=.3, disattenuate=FALSE,
constraint <- "cases"
res <- tam_jml_version1( resp=resp, group=group, adj=adj,
disattenuate=disattenuate, bias=bias, xsi.fixed=xsi.fixed,
xsi.inits=xsi.inits, A=A, B=B, Q=Q, ndim=ndim, theta.fixed=theta.fixed,
pweights=pweights, control=control )
xsi.inits=xsi.inits, A=A, B=B, Q=Q, ndim=ndim,
theta.fixed=theta.fixed, pweights=pweights, control=control )
}
#**** version=2
if (version>=2){
Expand Down
13 changes: 7 additions & 6 deletions R/tam.linking.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## File Name: tam.linking.R
## File Version: 0.347
## File Version: 0.349

tam.linking <- function( tamobj_list, type="Hae", method="joint",
pow_rob_hae=1, eps_rob_hae=1e-4, theta=NULL, wgt=NULL, wgt_sd=2, fix.slope=FALSE,
Expand All @@ -19,7 +19,8 @@ tam.linking <- function( tamobj_list, type="Hae", method="joint",
#--- extract parameters
parameters_list <- list()
for (mm in 1:NM){
parameters_list[[mm]] <- tam_linking_extract_parameters( tamobj=tamobj_list[[mm]],
parameters_list[[mm]] <- tam_linking_extract_parameters(
tamobj=tamobj_list[[mm]],
elim_items=elim_items[[mm]] )
}

Expand Down Expand Up @@ -55,10 +56,10 @@ tam.linking <- function( tamobj_list, type="Hae", method="joint",
s2 <- Sys.time()
time <- c(s1, s2)
res <- list(parameters_list=parameters_list, linking_list=linking_list, M_SD=M_SD,
trafo_persons=trafo_persons, trafo_items=trafo_items, N_common=N_common,
theta=theta, wgt=wgt, NS=NM, type=type, method=method,
pow_rob_hae=pow_rob_hae, eps_rob_hae=eps_rob_hae, par=par,
CALL=CALL,time=time)
trafo_persons=trafo_persons, trafo_items=trafo_items,
N_common=N_common, theta=theta, wgt=wgt, NS=NM, type=type,
method=method, pow_rob_hae=pow_rob_hae, eps_rob_hae=eps_rob_hae,
par=par, CALL=CALL,time=time)
class(res) <- "tam.linking"
return(res)
}
3 changes: 2 additions & 1 deletion R/tam.mml.3pl.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## File Name: tam.mml.3pl.R
## File Version: 9.882
## File Version: 9.888

tam.mml.3pl <- function( resp, Y=NULL, group=NULL,
formulaY=NULL, dataY=NULL,
Expand Down Expand Up @@ -638,6 +638,7 @@ tam.mml.3pl <- function( resp, Y=NULL, group=NULL,
}



# cat("\nM steps slopes") ; a1 <- Sys.time(); print(a1-a0) ; a0 <- a1

#--- guessing parameter estimation
Expand Down
5 changes: 3 additions & 2 deletions R/tam_accelerate_parameters.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## File Name: tam_accelerate_parameters.R
## File Version: 9.18
## File Version: 9.192

##############################################################################
# acceleration
Expand All @@ -22,7 +22,8 @@ tam_accelerate_parameters <- function( xsi_acceleration, xsi, iter, itermin=2, i
xsi <- xsi + w_accel *(xsi - parm_history[,3] )
parm_history[,1:2] <- parm_history[,2:3]
parm_history[,3] <- xsi
xsi_change <- cbind( parm_history[,2] - parm_history[,1], parm_history[,3] - parm_history[,2] )
xsi_change <- cbind( parm_history[,2] - parm_history[,1],
parm_history[,3] - parm_history[,2] )
lam <- eucl_norm( xsi_change[ind,2] )/ ( eucl_norm( xsi_change[ind,1] ) + eps )
if ( iter > itermin ){
w_accel <- lam / ( 2 - lam )
Expand Down
9 changes: 4 additions & 5 deletions R/tam_mml_3pl_mstep_item_slopes.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## File Name: tam_mml_3pl_mstep_item_slopes.R
## File Version: 9.647
## File Version: 9.658


#--- tam.mml.3pl estimate item slopes
Expand Down Expand Up @@ -90,7 +90,7 @@ tam_mml_3pl_mstep_item_slopes <- function( max.increment, np,
if ( ncol(gammaslope.prior)==4 ){
Xlambda <- ifelse( Xlambda < gammaslope.prior[,3],
gammaslope.prior[,3] + 1.3* h, Xlambda )
Xlambda <- ifelse( Xlambda > gammaslope.prior[,4],
Xlambda <- ifelse( Xlambda > gammaslope.prior[,4],
gammaslope.prior[,4] - 1.3* h, Xlambda )
}
}
Expand Down Expand Up @@ -145,12 +145,11 @@ tam_mml_3pl_mstep_item_slopes <- function( max.increment, np,
skip_B=skip_B, B=B )

#---- OUTPUT
res <- list(gammaslope=Xlambda, se.gammaslope=se.Xlambda,
res <- list(gammaslope=gammaslope, se.gammaslope=se.Xlambda,
max.increment.b=max.increment,
gammachange=max( abs( Xlambda00 - Xlambda) ),
gammaslope_change=gammaslope_change,
gammaslope_acceleration=gammaslope_acceleration, B=B
)
gammaslope_acceleration=gammaslope_acceleration, B=B )
return(res)
}
#----------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions R/tam_mml_create_nodes.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## File Name: tam_mml_create_nodes.R
## File Version: 0.331
## File Version: 0.332

tam_mml_create_nodes <- function(snodes, nodes, ndim, QMC,
skillspace="normal", theta.k=NULL)
Expand Down Expand Up @@ -48,7 +48,7 @@ tam_mml_create_nodes <- function(snodes, nodes, ndim, QMC,
# sampled theta values
if (QMC){
fac <- 1
r1 <- tam_import_sfsmisc_QUnif(n=snodes, min=0, max=1, n.min=1,
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){
Expand Down
4 changes: 2 additions & 2 deletions R/tamaanify.tam.mml.3pl.designMatrices.TRAIT.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## File Name: tamaanify.tam.mml.3pl.designMatrices.TRAIT.R
## File Version: 9.07
## File Version: 9.082

######################################
# TRAIT
Expand All @@ -25,7 +25,7 @@ tamaanify.tam.mml.3pl.designMatrices.TRAIT <- function( res ){
if ( ! is.null(B_fix) ){
Q.fixed <- NA*Q
colnames(B_fix) <- c("item_index", "cat", "dim", "value")
B_fix <- B_fix[ B_fix[,"cat"]==2, ]
B_fix <- B_fix[ B_fix[,"cat"]==2,, drop=FALSE ]
h1 <- B_fix[, c("item_index", "dim") ]
Q.fixed[ h1 ] <- B_fix[, "value"]
}
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# TAM
#### Test Analysis Modules


If you use `TAM` and have suggestions for improvement or have found bugs, please email me at [email protected].
If you use `TAM` and have suggestions for improvement or have found bugs, please email me at [email protected].
Please always provide a minimal dataset, necessary to demonstrate the problem,
a minimal runnable code necessary to reproduce the issue, which can be run on the given dataset, and
all necessary information on the used librarys, the R version, and the OS it is run on, perhaps a sessionInfo().

#### Manual

The manual may be found here [https://alexanderrobitzsch.github.io/TAM/](https://alexanderrobitzsch.github.io/TAM/)

#### CRAN version `TAM` 4.0-16 (2022-05-13)
#### CRAN version `TAM` 4.1-4 (2022-08-28)


[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version-last-release/TAM)](https://cran.r-project.org/package=TAM)
Expand All @@ -22,9 +24,9 @@ The CRAN version can be installed from within R using:
utils::install.packages("TAM")
```

#### GitHub version `TAM` 4.1-1 (2022-05-15)
#### GitHub version `TAM` 4.2-1 (2022-08-29)

[![](https://img.shields.io/badge/github%20version-4.1--1-orange.svg)](https://github.com/alexanderrobitzsch/TAM)&#160;&#160;
[![](https://img.shields.io/badge/github%20version-4.2--1-orange.svg)](https://github.com/alexanderrobitzsch/TAM)&#160;&#160;

The version hosted [here](https://github.com/alexanderrobitzsch/TAM) is the development version of `TAM`.
The GitHub version can be installed using `devtools` as:
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ pandoc: 1.13.1
pkgdown: 1.5.1
pkgdown_sha: ~
articles: []
last_built: 2022-05-15T07:23Z
last_built: 2022-08-29T09:18Z

2 changes: 1 addition & 1 deletion docs/reference/DescribeBy.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/IRT.WrightMap.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/IRT.cv.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7fd7423

Please sign in to comment.