From de01f2d837501f8dabe9eedef9bfb58d30ec5b94 Mon Sep 17 00:00:00 2001 From: corentinchoisy Date: Tue, 3 Jun 2025 16:25:15 +0200 Subject: [PATCH] corrected theta and residuals computation whith dif in pcm --- R/pcm.R | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/R/pcm.R b/R/pcm.R index 9a0680d..88674cc 100644 --- a/R/pcm.R +++ b/R/pcm.R @@ -45,11 +45,11 @@ pcm <- function(df=NULL,items=NULL,grp=NULL,dif.items=NULL,type.dif=NULL,weights stop('ERROR: no column named id provided') } suppressWarnings( - if (!is.null(grp) & any(apply(df[df[,grp]==0,items],2,function(k) max(k,na.rm = T))