Page 1 of 1

bug when setting starting parameters because of R update

Posted: Thu Oct 06, 2022 10:25 am
by wfleming
Since updating R I can no longer run models with start values and now receive error message
Error in if (class(testpd) == "try-error") { :
the condition has length > 1
From searching online it appears to be because of changes in that update that has affected multiple packages
https://stackoverflow.com/questions/728 ... o-logical1
https://stackoverflow.com/questions/731 ... s-length-1

It's reproducible with

Code: Select all

data(tutorial, package = "R2MLwiN")

# 5.5 Changing the random number seed and the parameter starting values  .66
## Set starting values for random and fixed parameter estimates
FP.b <- c(-2, 5)
names(FP.b) <- c("FP_Intercept", "FP_standlrt")
RP.b <- c(2, 4)
names(RP.b) <- c("RP2_var_Intercept", "RP1_var_Intercept")
startval <- list(FP.b = FP.b, RP.b = RP.b)

(mymodel7 <- runMLwiN(normexam ~ 1 + standlrt + (1 | school) + (1 | student), estoptions = list(EstM = 1, mcmcMeth = list(burnin = 0, 
  iterations = 500), startval = startval), data = tutorial))
My version details:

platform x86_64-w64-mingw32
arch x86_64
os mingw32
crt ucrt
system x86_64, mingw32
status
major 4
minor 2.1
year 2022
month 06
day 23
svn rev 82513
language R
version.string R version 4.2.1 (2022-06-23 ucrt)
nickname Funny-Looking Kid

Thanks

Re: bug when setting starting parameters because of R update

Posted: Mon Oct 10, 2022 1:39 pm
by ChrisCharlton
Thank you very much for reporting this problem. It should be fixed in the development version of the package, available from https://github.com/r-forge/r2mlwin/tree/master/R2MLwiN. We are hoping to do a new CRAN release that contains this and some other fixes soon, however we still have to do a few more tests before we can do this.

Re: bug when setting starting parameters because of R update

Posted: Fri Jun 02, 2023 4:13 pm
by Mike23ssss
ChrisCharlton wrote: Mon Oct 10, 2022 1:39 pm Thank you very much for reporting this problem. It should be fixed in the development version of the package, available from https://github.com/r-forge/r2mlwin/tree/master/R2MLwiN retro bowl . We are hoping to do a new CRAN release that contains this and some other fixes soon, however we still have to do a few more tests before we can do this.
I'm also looking forward to this new update

Re: bug when setting starting parameters because of R update

Posted: Tue Sep 26, 2023 4:40 am
by grippingfossil
ChrisCharlton wrote: Mon Oct 10, 2022 1:39 pm Thank you very much for reporting this problem. It should be fixed in the development version of the package, available from https://github.com/r-forge/r2mlwin/tree/master/R2MLwiN breakout game We are hoping to do a new CRAN release that contains this and some other fixes soon, however we still have to do a few more tests before we can do this.
I think the next versions need to fix this error more thoroughly.