11  Multivariate piecewise regression

Note

Read Chapter 9 before you start with this chapter.

The mplm function call

mplm(data, dvar, mvar, pvar, model = c(“W”, “H-M”, “B&L-B”, “JW”), contrast = c(“first”, “preceding”), contrast_level = c(NA, “first”, “preceding”), contrast_slope = c(NA, “first”, “preceding”), trend = TRUE, level = TRUE, slope = TRUE, formula = NULL, update = NULL, na.action = na.omit, …)

fit <- mplm(exampleAB_add, dvar = c("wellbeing", "depression"))
fit
Multivariate piecewise linear model

Dummy model: W level = first, slope = first

Coefficients: 
                       wellbeing depression
(Intercept)               48.417      4.200
day                        0.379      0.114
Level Phase Medication     3.588     -0.945
Slope Phase Medication    -0.275     -0.165

Formula: y ~ 1 + day + phaseMedication + interMedication

Type III MANOVA Tests: Pillai test statistic
                       Df test stat approx F num Df den Df Pr(>F)    
(Intercept)             1     0.915    188.9      2     35 <2e-16 ***
day                     1     0.055      1.0      2     35   0.38    
Level Phase Medication  1     0.033      0.6      2     35   0.56    
Slope Phase Medication  1     0.039      0.7      2     35   0.50    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

The following variables were used in this analysis:
'wellbeing/ depression' as dependent variable, 'phase' as phase variable, and 'day' as measurement-time variable.
print(fit, std = TRUE)
Multivariate piecewise linear model

Dummy model: W level = first, slope = first

Coefficients: 
                       wellbeing depression
(Intercept)               48.417      4.200
day                        0.379      0.114
Level Phase Medication     3.588     -0.945
Slope Phase Medication    -0.275     -0.165

Standardized coefficients: 
                       wellbeing depression
(Intercept)                0.000      0.000
day                        0.694      0.441
Level Phase Medication     0.276     -0.153
Slope Phase Medication    -0.356     -0.449

Formula: y ~ 1 + day + phaseMedication + interMedication

Type III MANOVA Tests: Pillai test statistic
                       Df test stat approx F num Df den Df Pr(>F)    
(Intercept)             1     0.915    188.9      2     35 <2e-16 ***
day                     1     0.055      1.0      2     35   0.38    
Level Phase Medication  1     0.033      0.6      2     35   0.56    
Slope Phase Medication  1     0.039      0.7      2     35   0.50    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

The following variables were used in this analysis:
'wellbeing/ depression' as dependent variable, 'phase' as phase variable, and 'day' as measurement-time variable.