Page 1 of 1

Linear Spline Modelling error

Posted: Tue Dec 01, 2020 4:46 pm
by scottwaterfield
Hi,
I am trying to run a linear spline model with 3 knot points.
I have code as follows:
(Mod <- runMLwiN(DX ~ 1 + s1 + s2 + s3 + s4 + (1 + s1 + s2 + s3 + s4|ID) + (1|occasion),
estoption = list(resi.store = TRUE),
data = df))

the data is sorted by: ID, followed by ocassion.
But I get the following when running the above code, which I can't find any guidance on:

/nogui option ignored
ECHO 0


Echoing is ON
BATC 1

Batch mode is ON
MAXI 2
STAR
iteration 0

Convergence not achieved
TOLE 2
MAXI 20
NEXT

error while obeying batch file C:/Users/gv20022/AppData/Local/Temp/Rtmpa2kQlY/macrofile_11dc17bf25db.txt at line number 83:
NEXT

random part gone to zero - can not continue


error while obeying batch file C:/Users/gv20022/AppData/Local/Temp/Rtmpa2kQlY/macrofile_11dc17bf25db.txt at line number 83:
NEXT


random part gone to zero - can not continue
.
Execution completed

Error in foreign::read.dta(IGLSfile) :
unable to open file: 'No such file or directory'

Thanks,
Scott

Re: Linear Spline Modelling error

Posted: Fri Dec 04, 2020 2:47 pm
by scottwaterfield
I have since found another question on this board asking a very similar question (viewtopic.php?f=7&t=3272&p=6622&hilit=s ... dc84#p6622), but have failed to successfullly enact the changes.

My code now looks as such:
smat <- matrix(nrow=2, ncol=2)
smat[1, 1] <- 1 # Level of covariance matrix
smat[1, 2] <- 2 # Level of covariance matrix
smat[2,] <- 1 # Set matrix type to diagonal
(Mod_TotFat_M <- runMLwiN(DX ~ 1 + s1 + s2 + s3 + s4 + (1 + s1 + s2 + s3 + s4|ID) + (1|occasion),
estoption = list(resi.store = TRUE, debugmode=T,
reset=c(0, 0), maxiter=150, smat=smat),
data = TotFat_M))

This now returns the following (near identical error):
/nogui option ignored
ECHO 0


Echoing is ON
BATC 1

Batch mode is ON
MAXI 2
STAR
iteration 0

Convergence not achieved
TOLE 2
MAXI 150
NEXT

error while obeying batch file C:/Users/gv20022/AppData/Local/Temp/RtmpEJGuA9/macrofile_19f852b87065.txt at line number 97:
NEXT

random part gone to zero - can not continue


error while obeying batch file C:/Users/gv20022/AppData/Local/Temp/RtmpEJGuA9/macrofile_19f852b87065.txt at line number 97:
NEXT


random part gone to zero - can not continue
.
Execution completed

Error in foreign::read.dta(IGLSfile) :
unable to open file: 'No such file or directory'

Re: Linear Spline Modelling error

Posted: Fri Dec 04, 2020 3:21 pm
by ChrisCharlton
Have you checked what the model equation looks like in MLwiN (this should automatically open when you run the command with the degbugmode option turned on)?

Re: Linear Spline Modelling error

Posted: Wed Aug 30, 2023 4:24 am
by annata20
I also faced the same problem recently, does anyone have a specific solution for it