# NOT RUN {
### Load dataset
data(Singh);
### Extract Jason
dat <- Singh[Singh$tier==1, ];
### Conduct piecewise regression analysis
piecewiseRegr(dat,
timeVar='time',
yVar='score_physical',
phaseVar='phase');
### Pretend treatment started between measurements
### 5 and 6
piecewiseRegr(dat,
timeVar='time',
yVar='score_physical',
baselineMeasurements=5);
# }
Run the code above in your browser using DataLab