What is the R equivalent of matlab's csaps()
csaps() in matlab does a cubic spline according to a particular definition of the smoothing parameter p . Here is some matlab code and its result: % x variable age = 75:99 % y variable diffs = [-39 -2 -167 -21 -13 32 -37 -132 -143 -91 -93 -88 -62 -112 -95 -28 -90 -40 -27 -23 -28 -11 -8 -6 1] % 0.0005 is the parameter p, and the later specification of % age are the desired x for prediction csaps(age,diffs,0.0005,age) % result (column headers removed): -63.4604 -64.0474 -64.6171 -65.1397 -65.6111 -66.0165 -66.3114 -66.4123 -66.2229 -65.6726 -64.7244 -63.3582 -61.5676 -59.3568 -56.7364 -53.7382