bug when setting starting parameters because of R update

Welcome to the forum for R2MLwiN users. Feel free to post your question about R2MLwiN here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Go to R2MLwiN: Running MLwiN from within R >> http://www.bris.ac.uk/cmm/software/r2mlwin/
Post Reply
wfleming
Posts: 11
Joined: Thu Aug 13, 2020 9:18 pm

bug when setting starting parameters because of R update

Post 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
ChrisCharlton
Posts: 1351
Joined: Mon Oct 19, 2009 10:34 am

Re: bug when setting starting parameters because of R update

Post 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.
Mike23ssss
Posts: 3
Joined: Fri Jun 02, 2023 3:48 pm

Re: bug when setting starting parameters because of R update

Post 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
grippingfossil
Posts: 9
Joined: Fri Jan 13, 2023 2:58 am

Re: bug when setting starting parameters because of R update

Post 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.
Post Reply