From 53c9ab9f76e45594b29904e7c774fbaa03bdbab3 Mon Sep 17 00:00:00 2001 From: Robitzsch Date: Sat, 16 Sep 2023 12:52:21 +0200 Subject: [PATCH] 4.0-19 --- DESCRIPTION | 4 ++-- R/RcppExports.R | 2 +- R/mcmclist2coda.R | 6 +++--- R/mgsem.R | 6 ++++-- R/mgsem_vcov_me.R | 8 ++++++-- README.md | 4 ++-- inst/NEWS | 2 +- man/mgsem.Rd | 4 +++- src/RcppExports.cpp | 2 +- 9 files changed, 23 insertions(+), 15 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 3cde7e0b..51a69d03 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: sirt Type: Package Title: Supplementary Item Response Theory Models -Version: 4.0-17 -Date: 2023-08-29 11:07:58.723017 +Version: 4.0-19 +Date: 2023-09-16 12:28:54.454634 Author: Alexander Robitzsch [aut,cre] () Maintainer: Alexander Robitzsch Description: diff --git a/R/RcppExports.R b/R/RcppExports.R index cd969de6..19e141aa 100644 --- a/R/RcppExports.R +++ b/R/RcppExports.R @@ -1,5 +1,5 @@ ## File Name: RcppExports.R -## File Version: 4.000017 +## File Version: 4.000019 # Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 diff --git a/R/mcmclist2coda.R b/R/mcmclist2coda.R index a251c491..d24d604b 100644 --- a/R/mcmclist2coda.R +++ b/R/mcmclist2coda.R @@ -1,5 +1,5 @@ ## File Name: mcmclist2coda.R -## File Version: 0.10 +## File Version: 0.11 # write elements from mcmcmlist into code file @@ -11,10 +11,10 @@ mcmclist2coda <- function( mcmclist, name, coda.digits=5 ) BB <- nrow(m1) VV <- length(vars) c1 <- paste( vars, seq( 1, BB*VV, BB ), seq( BB, BB*VV, BB ) ) - writeLines( c1, paste0( name, "_codaIndex.txt" ) ) + writeLines( c1, paste0( name, '_codaIndex.txt' ) ) #--- create coda file m2 <- matrix( m1, ncol=1 ) m2 <- paste( rep(1:BB, VV ), round( m2[,1], coda.digits ) ) - writeLines( m2, paste0( name, "_coda1.txt" ) ) + writeLines( m2, paste0( name, '_coda1.txt' ) ) } diff --git a/R/mgsem.R b/R/mgsem.R index c19fbdd4..031a0e61 100644 --- a/R/mgsem.R +++ b/R/mgsem.R @@ -1,5 +1,5 @@ ## File Name: mgsem.R -## File Version: 0.547 +## File Version: 0.553 mgsem <- function(suffstat, model, data=NULL, group=NULL, weights=NULL, estimator="ML", p_me=2, p_pen=1, pen_type="scad", @@ -168,6 +168,7 @@ mgsem <- function(suffstat, model, data=NULL, group=NULL, weights=NULL, vcov <- res$vcov se <- res$se comp_se_me <- res$comp_se_me + me_delta_method <- res #-- residual statistics residuals <- mgsem_output_proc_residuals(implied=implied, suffstat=suffstat) @@ -202,7 +203,8 @@ mgsem <- function(suffstat, model, data=NULL, group=NULL, weights=NULL, pen_type=pen_type, eps_approx=eps_approx, technical=technical, comp_se=comp_se, groups=groups, group=group, data=data, data_proc=data_proc, case_ll=case_ll, - suffstat_vcov=suffstat_vcov, CALL=CALL, s1=s1, s2=s2) + suffstat_vcov=suffstat_vcov, me_delta_method=me_delta_method, + CALL=CALL, s1=s1, s2=s2) class(res) <- 'mgsem' return(res) } diff --git a/R/mgsem_vcov_me.R b/R/mgsem_vcov_me.R index f9609c0a..4320bc6b 100644 --- a/R/mgsem_vcov_me.R +++ b/R/mgsem_vcov_me.R @@ -1,5 +1,5 @@ ## File Name: mgsem_vcov_me.R -## File Version: 0.162 +## File Version: 0.169 mgsem_vcov_me <- function(coef, opt_fun_args, suffstat_vcov, comp_se, se_delta_formula=FALSE) @@ -9,6 +9,8 @@ mgsem_vcov_me <- function(coef, opt_fun_args, suffstat_vcov, comp_se, if ( (estimator=='ML') & comp_se & se_delta_formula ){ comp_se_me <- TRUE } + A <- NULL + V <- NULL if (comp_se_me){ NP <- length(coef) parnames <- names(coef) @@ -29,6 +31,8 @@ mgsem_vcov_me <- function(coef, opt_fun_args, suffstat_vcov, comp_se, suffstat_pars <- suffstat_vcov$suffstat_pars SP <- nrow(suffstat_pars) V <- suffstat_vcov$suffstat_vcov + rownames(V) <- suffstat_pars$label + colnames(V) <- suffstat_pars$label grad_der_suffstat <- matrix(0, nrow=NP, ncol=SP) rownames(grad_der_suffstat) <- parnames colnames(grad_der_suffstat) <- suffstat_pars$label @@ -76,6 +80,6 @@ mgsem_vcov_me <- function(coef, opt_fun_args, suffstat_vcov, comp_se, } #--- output - res <- list(vcov=vcov, se=se, comp_se_me=comp_se_me) + res <- list(vcov=vcov, se=se, A=A, V=V, comp_se_me=comp_se_me) return(res) } diff --git a/README.md b/README.md index 964e4810..a20e077d 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,9 @@ The CRAN version can be installed from within R using: utils::install.packages("sirt") ``` -#### GitHub version `sirt` 4.0-17 (2023-08-29) +#### GitHub version `sirt` 4.0-19 (2023-09-16) -[![](https://img.shields.io/badge/github%20version-4.0--17-orange.svg)](https://github.com/alexanderrobitzsch/sirt)   +[![](https://img.shields.io/badge/github%20version-4.0--19-orange.svg)](https://github.com/alexanderrobitzsch/sirt)   The version hosted [here](https://github.com/alexanderrobitzsch/sirt) is the development version of `sirt`. The GitHub version can be installed using `devtools` as: diff --git a/inst/NEWS b/inst/NEWS index 7c81b31f..96f0578e 100644 --- a/inst/NEWS +++ b/inst/NEWS @@ -37,7 +37,7 @@ CHANGELOG sirt ------------------------------------------------------------------------ -VERSIONS sirt 4.0 | 2023-08-29 | Last: sirt 4.0-17 +VERSIONS sirt 4.0 | 2023-09-16 | Last: sirt 4.0-19 ------------------------------------------------------------------------ FIXED * fixed incorrect handling of lower and upper bounds of item diff --git a/man/mgsem.Rd b/man/mgsem.Rd index 90478bb4..f2f37f5a 100644 --- a/man/mgsem.Rd +++ b/man/mgsem.Rd @@ -1,5 +1,5 @@ %% File Name: mgsem.Rd -%% File Version: 0.082 +%% File Version: 0.083 \name{mgsem} \alias{mgsem} @@ -124,6 +124,8 @@ A list with following values \item{ic}{Information criteria} \item{technical}{Specifications of optimizer} \item{suffstat_vcov}{Variance matrix of sufficient statistics} +\item{me_delta_method}{Input and output matrices for delta method if +\code{estimator="ME"}} \item{data_proc}{Processed data} \item{case_ll}{Casewise log-likelihood function} \item{\dots}{Further values} diff --git a/src/RcppExports.cpp b/src/RcppExports.cpp index f9350840..1ecb7aee 100644 --- a/src/RcppExports.cpp +++ b/src/RcppExports.cpp @@ -1,5 +1,5 @@ //// File Name: RcppExports.cpp -//// File Version: 4.000017 +//// File Version: 4.000019 // Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393