rcs()function as the second argument. Also note that
rcs(xi, 4)will select the knot positions based on all (non-missing)
xivalues, but if there are (additional) missing values in
vi, then the actual analysis will be based on a subset of the data for which the chosen knot positions might not be ideal.