# NOT RUN {
alpha <- 0.05
m <- 8
# Find the vector (b(d/6),...,b(5d/6),s(0),...,s(5d/6)) that specifies the
# Kabaila & Giri (2009) CIUUPI for the first definition of the
# scaled expected length (default) (takes about 30 mins to run):
# }
# NOT RUN {
bsvec <- bsciuupi2(alpha, m, rho = -0.7071068)
# }
# NOT RUN {
# The result bsvec is (to 7 decimal places) the following:
bsvec <- c(-0.0287487, -0.2151595, -0.3430403, -0.3125889, -0.0852146,
1.9795390, 2.0665414, 2.3984471, 2.6460159, 2.6170066, 2.3925494)
# Graph the functions b and s
x <- seq(0, 8, by = 0.1)
splineval <- bsspline2(x, bsvec, alpha, m)
plot(x, splineval[, 2], type = "l", main = "b function",
ylab = " ", las = 1, lwd = 2, xaxs = "i", col = "blue")
plot(x, splineval[, 3], type = "l", main = "s function",
ylab = " ", las = 1, lwd = 2, xaxs = "i", col = "blue")
# }
Run the code above in your browser using DataLab