Piecewise function on mlwin

Welcome to the forum for MLwiN users. Feel free to post your question about MLwiN software 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!

Remember to check out our extensive software FAQs which may answer your question: http://www.bristol.ac.uk/cmm/software/s ... port-faqs/
Post Reply
Katekeri
Posts: 4
Joined: Thu May 30, 2024 3:39 pm

Piecewise function on mlwin

Post by Katekeri »

Hi all,

I am trying to fit a piecewise multilevel model on mlwin where there are four measurements taken during a treatment study. 3 measurements (baseline, mid-treatment and end of treatment) are taken during the treatment phase and one measurement during follow up. I am interested in assessing the effect of treatment (treatment group by time interaction) at the end of treatment and at follow-up. In this case, is it correct to specify the first time piece as 0, 0.5, 1, 1 and the second time piece as 0, 0, 0, 1?

Thanks a lot for your help.
LillianQuinn
Posts: 1
Joined: Wed Jul 09, 2025 4:28 am

Re: Piecewise function on mlwin

Post by LillianQuinn »

Yes, the way you split the time piece [0, 0.5, 1, 1] for the treatment period and [0, 0, 0, 1] for the follow-up period is correct to assess the treatment effect at end-point and post-treatment in the piecewise hierarchical model.
louiseravot
Posts: 1
Joined: Wed Jul 09, 2025 5:16 pm

Re: Piecewise function on mlwin

Post by louiseravot »

Yes, your coding looks appropriate for a piecewise multilevel model. The first time piece (0, 0.5, 1, 1) captures the treatment phase with linear change, plateauing after treatment ends, and the second time piece (0, 0, 0, 1) captures change during the follow-up period. This should allow you to assess both the treatment effect and any change post-treatment effectively
Post Reply