Closed Johnzav888 closed 6 years ago
Hi John, thanks for reporting this. You have specified your model correctly, this is a small bug in the summary()
method. The theta
column is displayed incorrectly, as you note the thetas for 'treatment' and 'time' have switched place, and should be 0.2 for time
.
Power
use the normal approximation to calculate p-values (Wald test), and Power_bw
use the t-distribution with tot_n - 2 degrees of freedom (for a 2-level model).
Dear Kristoffer,
I am very glad to see that you updated the powerlmm package and that you are trying to improve it! Keep up the good work!
To my problem now, I am working on longitudinal models. More precisely, I have 2 level structure with subjects randomized in 2 treatments and they are followed over time. Treatment is the only covariate in the data along with Time and their interaction, where I am most interested in.
I try to simulate some data. When I use the following input, the time and the treatment estimates seem to mess up with each other. In the input I understand that the Time estimate(slope in the control group) is given through the parameter “fixed_slope”, but looking at the results further below, I see that the theta for Time is 0 while the input that I specified(fixed_slope = 0.2) is given to the Treatment theta! And in addition, I see that the mean estimate of the time is 0.20( as it should be)!! Is this a bug or have I misunderstood something here?
P.S. What is the differnece between Power & Power_bw ?
Input
Sim
Output
Fixed effects
Thanks, John