Skip to content

Commit

Permalink
3.6-29
Browse files Browse the repository at this point in the history
  • Loading branch information
Robitzsch committed Jan 24, 2021
1 parent 80f2980 commit e5c6d26
Show file tree
Hide file tree
Showing 19 changed files with 61 additions and 45 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: 3.6-28
Date: 2021-01-19 15:04:01
Version: 3.6-29
Date: 2021-01-24 15:14:26
Author:
Alexander Robitzsch [aut,cre] (<https://orcid.org/0000-0002-8226-3132>),
Thomas Kiefer [aut],
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: 3.006028
## File Version: 3.006029
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

Expand Down
10 changes: 5 additions & 5 deletions R/designMatrices.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## File Name: designMatrices.R
## File Version: 9.194
## File Version: 9.195

designMatrices <- function( modeltype=c( "PCM", "RSM" ),
maxKi=NULL, resp=resp, ndim=1, A=NULL, B=NULL, Q=NULL, R=NULL,
Expand Down Expand Up @@ -122,8 +122,8 @@ designMatrices <- function( modeltype=c( "PCM", "RSM" ),
#*****************************
# constraint="items"
unidim <- is.null(Q)
if ( constraint=="items"){

if ( constraint=="items"){
if ( ! is.null(Q) ){
unidim <- ncol(Q)==1
}
Expand Down Expand Up @@ -174,13 +174,13 @@ designMatrices <- function( modeltype=c( "PCM", "RSM" ),
vars <- colnames(resp)
vars <- c(vars, paste0( "Cat", 1:(maxK-1) ) )
dimnames(A)[[3]] <- vars

if ( (constraint=="items") & unidim ){
v1 <- A[I,,I]
A[I,,1:(I-1)] <- -v1
A <- A[,,-c(I)]
}

A.draft <- A
}
if ( ! is.null(A0)){
Expand Down
5 changes: 3 additions & 2 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.361
## File Version: 9.363


tam.jml <- function( resp, group=NULL, adj=.3, disattenuate=FALSE,
Expand Down Expand Up @@ -42,7 +42,8 @@ tam.jml <- function( resp, group=NULL, adj=.3, disattenuate=FALSE,
#- process item parameters
res$AXsi <- tam_jml_compute_Axsi(A=res$A, xsi=res$xsi, resp=resp)
#- item parameter table
res$item1 <- tam_jml_itempartable( resp=resp, maxK=res$maxK, AXsi=res$AXsi,
res$item1 <- res$item
res$item <- tam_jml_itempartable( resp=resp, maxK=res$maxK, AXsi=res$AXsi,
B=res$B, resp.ind=res$resp.ind)
#- theta summary
res$theta_summary <- tam_jml_proc_abilities(theta=res$theta,
Expand Down
14 changes: 7 additions & 7 deletions R/tam.jml.fit.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## File Name: tam.jml.fit.R
## File Version: 9.201
## File Version: 9.204


tam.jml.fit <- function( tamobj )
tam.jml.fit <- function( tamobj, trim_val=10 )
{
s1 <- Sys.time()
resp <- tamobj$resp
Expand All @@ -28,7 +28,7 @@ tam.jml.fit <- function( tamobj )
B.0[ is.na(B.0) ] <- 0
B1 <- B.0[,,1]
BB <- B1^2
theta.unique <- unique( theta )
theta.unique <- unique(theta)
NU <- length(theta.unique)
B_bari <- array(0,dim=c(NU, nitems))
BB_bari <- array(0, dim=c(NU, nitems))
Expand All @@ -43,15 +43,15 @@ tam.jml.fit <- function( tamobj )
BB_bari <- BB_bari + t( BB[,kk] * rprobs[, kk, ] )
}
ind.theta <- match( theta, theta.unique)
rprobs <- rprobs[,, ind.theta ]
rprobs <- rprobs[,, ind.theta ]
B_bari <- B_bari[ ind.theta, ]
BB_bari <- BB_bari[ ind.theta, ]
B_bari <- B_bari * resp.ind
BB_bari <- BB_bari * resp.ind
B_var <- BB_bari - (B_bari^2)
z_sq <- (resp - B_bari)^2/B_var
zsd <- sd(as.matrix(z_sq),na.rm=TRUE)
z_sq[z_sq > 10*zsd] <- 10*zsd #Trim extreme values
zsd <- stats::sd(as.matrix(z_sq),na.rm=TRUE)
z_sq[z_sq > trim_val*zsd] <- trim_val*zsd #Trim extreme values
B_bariM <- aperm(outer(B_bari,rep(1,maxK)),c(2,3,1))
B1M <- outer(B1,rep(1,nstud))
for (kk in 1:maxK){
Expand Down Expand Up @@ -82,11 +82,11 @@ tam.jml.fit <- function( tamobj )
fit.item <- data.frame(item=colnames(tamobj$resp), outfitItem=outfitItem,
outfitItem_t=outfitItem_t, infitItem=infitItem,
infitItem_t=infitItem_t)

fit.person <- data.frame(outfitPerson=outfitPerson,
outfitPerson_t=outfitPerson_t, infitPerson=infitPerson,
infitPerson_t=infitPerson_t)

#-- output
s2 <- Sys.time()
v1 <- c(s1, s2)
res <- list(fit.item=fit.item, fit.person=fit.person, time=v1)
Expand Down
15 changes: 9 additions & 6 deletions R/tam_thurstonian_threshold.R → R/tam.threshold.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
## File Name: tam_thurstonian_threshold.R
## File Version: 9.11
## File Name: tam.threshold.R
## File Version: 9.15


#**** Thurstonian thresholds (gammas)

####################################################################
# Thurstonian thresholds (gammas)
#...................................................................
tam.threshold <- function (tamobj, prob.lvl=0.5)
{
resp <- tamobj$resp
nitems <- tamobj$nitems
maxK <- tamobj$maxK
AXsi <- tamobj$AXsi
xsi <- ( tamobj$xsi )[,1]
xsi <- tamobj$xsi
if (class(tamobj)!="tam.jml"){
xsi <- xsi[,1]
}
A <- tamobj$A
B <- tamobj$B
maxKi <- apply( resp, 2, max, na.rm=TRUE )
Expand Down
4 changes: 2 additions & 2 deletions R/tam_jml_version2.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## File Name: tam_jml_version2.R
## File Version: 9.525
## File Version: 9.526

tam_jml_version2 <- function( resp, group=NULL, adj=.3, disattenuate=FALSE,
bias=TRUE, xsi.fixed=NULL, xsi.inits=NULL, A=NULL, B=NULL, Q=NULL,
Expand Down Expand Up @@ -153,7 +153,7 @@ tam_jml_version2 <- function( resp, group=NULL, adj=.3, disattenuate=FALSE,

# center theta?
center_theta <- is.null(xsi.fixed) & (constraint=="cases")

deviance <- 0
deviance.history <- matrix( 0, nrow=maxiter, ncol=2)
colnames(deviance.history) <- c("iter", "deviance")
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ The CRAN version can be installed from within R using:
utils::install.packages("TAM")
```

#### GitHub version `TAM` 3.6-28 (2021-01-19)
#### GitHub version `TAM` 3.6-29 (2021-01-24)

[![](https://img.shields.io/badge/github%20version-3.6--28-orange.svg)](https://github.com/alexanderrobitzsch/TAM)&#160;&#160;
[![](https://img.shields.io/badge/github%20version-3.6--29-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.

2 changes: 1 addition & 1 deletion 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: 2021-01-19T14:20Z
last_built: 2021-01-24T14:29Z

7 changes: 6 additions & 1 deletion docs/reference/tam.fit.html

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

4 changes: 2 additions & 2 deletions docs/reference/tam.jml.html

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

7 changes: 6 additions & 1 deletion inst/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ http://www.edmeasurementsurveys.com/TAM/Tutorials/


-------------------------------------------------------------
VERSIONS TAM 3.6 | 2021-01-19 | Last: TAM 3.6-28
VERSIONS TAM 3.6 | 2021-01-24 | Last: TAM 3.6-29
-------------------------------------------------------------

FIXED * fixed an issue in tam.linking() if number of maximum
Expand All @@ -60,6 +60,11 @@ FIXED * handling of person weights in multi faceted models
NOTE * added constraints option in designMatrices() function
for rating scale models (modeltype='RSM')
(thanks to Stefanie Wind)
NOTE * switched labeling of output values 'item' and 'item1'
in models of class 'tam.jml'
NOTE * included argument 'trim_val' in tam.jml.fit()
FIXED * tam.threshold() now works for objects of class 'tam.jml'
(requested by Angel Zegarra)


DATA * included/modified datasets: ---
Expand Down
6 changes: 4 additions & 2 deletions man/tam.fit.Rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%% File Name: tam.fit.Rd
%% File Version: 2.561
%% File Version: 2.562

\name{tam.fit}

Expand All @@ -24,7 +24,7 @@ tam.fit(tamobj, ...)
tam.mml.fit(tamobj, FitMatrix=NULL, Nsimul=NULL,progress=TRUE,
useRcpp=TRUE, seed=NA, fit.facets=TRUE)

tam.jml.fit(tamobj)
tam.jml.fit(tamobj, trim_val=10)

\method{summary}{tam.fit}(object, file=NULL, \dots)
}
Expand Down Expand Up @@ -54,6 +54,8 @@ The latter is consistent with \pkg{TAM} (<=1.1).}
\item{seed}{Fixed simulation seed.}
\item{fit.facets}{An optional logical indicating whether
fit for all facet parameters should be computed.}
\item{trim_val}{Optional trimming value. Squared standardized reaisuals
larger than \code{trim_val} are set to \code{trim_val}.}
\item{object}{Object of class \code{tam.fit}}
\item{file}{Optional file name for summary output}
\item{\dots}{Further arguments to be passed}
Expand Down
6 changes: 3 additions & 3 deletions man/tam.jml.Rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%% File Name: tam.jml.Rd
%% File Version: 2.401
%% File Version: 2.402

\name{tam.jml}

Expand Down Expand Up @@ -125,7 +125,7 @@ A file name in which the summary output will be written

\value{
A list with following entries
\item{item}{Data frame with item parameters}
\item{item1}{Data frame with item parameters}
\item{xsi}{Vector of item parameters \eqn{\xi}}
\item{errorP}{Standard error of item parameters \eqn{\xi}}
\item{theta}{MLE in final step}
Expand All @@ -150,7 +150,7 @@ A list with following entries
\item{resp.ind.list}{Like \code{resp.ind}, only in the format of a list}
\item{xsi.fixed}{Fixed \eqn{\xi} item parameters}
\item{control}{Control list}
\item{item1}{Extended data frame of item parameters}
\item{item}{Extended data frame of item parameters}
\item{theta_summary}{Summary of person parameters}
\item{\dots}{}
}
Expand Down
2 changes: 1 addition & 1 deletion src/RcppExports.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//// File Name: RcppExports.cpp
//// File Version: 3.006028
//// File Version: 3.006029
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

Expand Down
2 changes: 1 addition & 1 deletion src/init.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//// File Name: init.c
//// File Version: 3.006028
//// File Version: 3.006029
#include <R.h>
#include <Rinternals.h>
#include <stdlib.h> // for NULL
Expand Down

0 comments on commit e5c6d26

Please sign in to comment.