You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
p1 <- study_parameters(n1 = 10, # number of measurements per subject
n2 = 10, # number of subjects per treatment
fixed_intercept = 2.4,
fixed_slope = 0.20,
sigma_subject_intercept = 0.61,
sigma_subject_slope = 0.03,
cor_subject = -0.30,
sigma_error = 0.78,
effect_size = -0.8)
parameter M_est theta M_se SD_est Power Power_bw Power_satt
(Intercept) 2.4032 2.400 0.242 0.240 1.00 NA NaN
treatment -0.0076 0.200 0.342 0.339 0.06 NA NaN
time 0.2000 0.000 0.030 0.029 1.00 NA NaN
time:treatment -0.0884 -0.089 0.042 0.040 0.54 0.49 NaN
---
Number of simulations: 5000 | alpha: 0.05
Time points (n1): 10
Subjects per cluster (n2 x n3): 10 (treatment)
10 (control)
Thanks,
John
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: