# Second order B spline with 2 knots and random effects on the 2nd coefficient
dspline(type="bs", knots=2, degree=2,
beta.1="rel", beta.2="rel")
# Piecewise linear spline with knots at 0.1 and 0.5 quantiles
# Single parameter independent of treatment estimated for 1st coefficient
#with random effects
dspline(type="ls", knots=c(0.1,0.5),
beta.1="random", beta.2="rel")
Run the code above in your browser using DataLab