MLpowsim problem for continuous x random slope model
MLpowsim problem for continuous x random slope model
hi Chris and Bill,
I have a problem with MLpowsim for a two level random slope model. the model is similar to the illustration of page 62 the MLpowsim userbook. There is only one continuous x included in the model (random slope). MLpowsim is working with binary X with random slope, but for continuous x (mean= 0, with 0.9= level 1 variance , 0.1= level 2 var), the code ran for 2 seconds and stopped with following message :
Numeric error(s) in calculate command. Affected entries replaced with system missing.
error while obeying batch file analyse.txt at line number 51:
CALC b203=0.600000/b203
Numeric error(s) in calculate command. Affected entries replaced with system missing.
error while obeying batch file analyse.txt at line number 53:
CALC b206=0.600000/b206
Numeric error(s) in calculate command. Affected entries replaced with system missing.
error while obeying batch file analyse.txt at line number 55:
CALC b207=0.600000/b207
Numeric error(s) in calculate command. Affected entries replaced with system missing.
>WSET
if I run a radome intercept only model with continuous X included as fixed effect explanatory, MLpowsim worked very well. just do not know why random slope continuous X not allowed? any help please? I only replace the binary gender with a continuous x in the illustration. my window is window 10 and MLpowsim is the latest version.
I have a problem with MLpowsim for a two level random slope model. the model is similar to the illustration of page 62 the MLpowsim userbook. There is only one continuous x included in the model (random slope). MLpowsim is working with binary X with random slope, but for continuous x (mean= 0, with 0.9= level 1 variance , 0.1= level 2 var), the code ran for 2 seconds and stopped with following message :
Numeric error(s) in calculate command. Affected entries replaced with system missing.
error while obeying batch file analyse.txt at line number 51:
CALC b203=0.600000/b203
Numeric error(s) in calculate command. Affected entries replaced with system missing.
error while obeying batch file analyse.txt at line number 53:
CALC b206=0.600000/b206
Numeric error(s) in calculate command. Affected entries replaced with system missing.
error while obeying batch file analyse.txt at line number 55:
CALC b207=0.600000/b207
Numeric error(s) in calculate command. Affected entries replaced with system missing.
>WSET
if I run a radome intercept only model with continuous X included as fixed effect explanatory, MLpowsim worked very well. just do not know why random slope continuous X not allowed? any help please? I only replace the binary gender with a continuous x in the illustration. my window is window 10 and MLpowsim is the latest version.

 Posts: 1071
 Joined: Mon Oct 19, 2009 10:34 am
Re: MLpowsim problem for continuous x random slope model
Could you please let us know the full set of inputs used to generate the files from MLPowSim, so that we can accurately replicate the problem?
Re: MLpowsim problem for continuous x random slope model
Thanks Chris, please see my filed uploaded through the system, have to do it one by one as uploading multiple files not allowed. Boliang
 Attachments

 analyse.txt
 (1.47 KiB) Downloaded 39 times
Re: MLpowsim problem for continuous x random slope model
here is the setup file for you Chris
 Attachments

 setup.txt
 (922 Bytes) Downloaded 35 times
Re: MLpowsim problem for continuous x random slope model
here are the graphs file for you chris
 Attachments

 graphs.txt
 (582 Bytes) Downloaded 45 times

 Posts: 1071
 Joined: Mon Oct 19, 2009 10:34 am
Re: MLpowsim problem for continuous x random slope model
Thanks for this. I don't suppose that you could also provide the answers that you initially gave to MLPowSim, as that would allow us to generate the macro files (and regenerate them if we find a bug that needs fixing)?
Re: MLpowsim problem for continuous x random slope model
Hi Chris,
thanks for looking my query. I am afraid I am not clear what you mean for "answers intitially for MLpowsim" . I originally bet you could find the parameters information from the code. anyway, here are the 2level model parameter I am using. with numbers in parenthesis are the estimates' values to feed MLpowsim.
y=B0j+B1j*Xij
B0j=B0(0.1)+u0+e
B1j=B1(0.6)+u1
U0 Sgu0(0.08)
U1 cov(0.25) Sgu1(0.02)
Sge=0.8
X~N(0, Var_lev1(1), var_lev2(0.1)) as per Userbook suggestd mean(X)=0
the number of level 2 unit is about 30 to 50 with steps=5
the number of level 1 unit is about 25 to 40 with steps=5
I tried many various number for level 1 and 2 unit numbers.
please let me know any other information you need, thanks,
Boliang
thanks for looking my query. I am afraid I am not clear what you mean for "answers intitially for MLpowsim" . I originally bet you could find the parameters information from the code. anyway, here are the 2level model parameter I am using. with numbers in parenthesis are the estimates' values to feed MLpowsim.
y=B0j+B1j*Xij
B0j=B0(0.1)+u0+e
B1j=B1(0.6)+u1
U0 Sgu0(0.08)
U1 cov(0.25) Sgu1(0.02)
Sge=0.8
X~N(0, Var_lev1(1), var_lev2(0.1)) as per Userbook suggestd mean(X)=0
the number of level 2 unit is about 30 to 50 with steps=5
the number of level 1 unit is about 25 to 40 with steps=5
I tried many various number for level 1 and 2 unit numbers.
please let me know any other information you need, thanks,
Boliang

 Posts: 1071
 Joined: Mon Oct 19, 2009 10:34 am
Re: MLpowsim problem for continuous x random slope model
I was hoping for something like:
Could you confirm that this matches your inputs?
Code: Select all

 MLPowSim version 1.0 Beta 2 
 
 coded by William J. Browne and Mousa Golalizadeh (c) February 2018 
 
 MLPowSim is free software and comes with absolutely NO WARRANTY 
 MLPowSim produces output files that can be used by the R or MLwiN 
 packages. 
 We make no guarantees that the files produced are in any sense correct 
 or will run in these packages. 
 The further use of any files generated by MLPowSim is the responsibility 
 of the user for whatever purposes they may be used. 

To continue using this program having read and understood this
disclaimer please input 1 : 1
Welcome to MLPowSim
Please input 0 to generate R code and 1 to generate MLwiN macros: 1
Please choose model type
1. 1level model
2. 2level balanced data nested model
3. 2level unbalanced data nested model
4. 3level balanced data nested model
5. 3level unbalanced data nested model
6. 3classification balanced crossclassified model
7. 3classification unbalanced crossclassified model
Model type : 2
Please input the random number seed: 1
Please input the significance level for testing the parameters: 0.025
Please input number of simulations per setting: 1000
Model setup
Please input response type [0  Normal, 1 Bernouilli, 2 Poisson] : 0
Please enter estimation method [0  RIGLS, 1  IGLS, 2  MCMC] : 1
Do you want to include the fixed intercept in your model (1=YES 0=NO )? 1
Do you want to have a random intercept in your model (1=YES 0=NO )? 1
Do you want to include any explanatory variables in your model (1=YES 0=NO)? 1
How many explanatory variables do you want to include in your model? 1
Please choose a type for the predictor x1 (1=Binary 2=Continuous 3=all MVN): 2
Assuming normality, please input its parameters here:
The mean of the predictor x1: 0
The variance of the predictor x1 at level 1: 0.9
The variance of the predictor x1 at level 2: 0.1
Do you want the coefficient associated with explanatory variable x1 to be random (1=YES 0=NO) ? 1
Sample size set up
Please input the smallest number of units for the second level: 30
Please input the largest number of units for the second level: 50
Please input the step size for the second level: 5
Please input the smallest number of units for the first level per second level: 25
Please input the largest number of units for the first level per second level: 40
Please input the step size for the first level per second level: 5
Parameter estimates
Please input estimate of beta_0: 0.1
Please input estimate of beta_1: 0.6
There is more than one random effect in your model and so you need to enter variance/covariance matrix.
Please input lower triangular entries ( 3 elements):
entry (1,1) is : 0.08
entry (2,1) is : 0.25
entry (2,2) is : 0.02
Please input estimate of sigma^2_e: 0.8
Files to perform power analysis for the 2 level nested model with the following
sample criterion have been created
Sample size in the first level starts at 25 and finishes at 40 with the step size 5
Sample size in the second level starts at 30 and finishes at 50 with the step size 5
1000 simulations for each sample size combination will be performed
Re: MLpowsim problem for continuous x random slope model
yes Chris, that is what I did in the black window!!
by the way, how could you copy these from the black window? i tried many times to copy the procedural information but not success at all!!
by the way, how could you copy these from the black window? i tried many times to copy the procedural information but not success at all!!