Create psyfit.R

Function to fit a psychometric function in R, with bootstrapped confidence intervals.