---------------------------------- spline fit to logit of cdf > xval = sort(geyser$wait) summary(diff(xval)) ## lots of tied observations !! > tmptab = table(geyser$wait) xval = as.numeric(names(tmptab)) ### only 52 distinct values! > splgey = smooth.spline(xval, -log(300/(cumsum(tmptab) - 1), spar=1.e-6) > plot(xval, plogis(predict(splgey)$y)) ### This gives df, not derivative ### the differentiated spline is very erratic > splgey2 = smooth.spline(xval, cumsum(tmptab)/300, spar=1.e-3) plot(xval, predict(splgey2,deriv=1)$y) plot(lowess(xval,predict(splgey2,deriv=1)$y)) > splgey2 = smooth.spline(xval, cumsum(tmptab)/300, nknots=20, spar=1.e-3) plot(xval, predict(splgey2, deriv=1)$y) > splgey3 = smooth.spline(xval, cumsum(tmptab)/300, nknots=10, spar=1.e-3) plot(xval, predict(splgey3, deriv=1)$y) > splgey3 = smooth.spline(xval, cumsum(tmptab)/300, nknots=10, spar=1.e-3) > plot(xval, predict(splgey3, deriv=1)$y) >