[R] Inverse Prediction with splines

2011-01-20 Thread Jeffrey.Morris
Hello, I have fit a simple spline model to the following data. Data x y 0 1.298 2 0.605 3 0.507 4 0.399 5 0.281 6 0.203 7 0.150 8 0.101 Model Sp.1=lm(y~bs(x,df=4)) Now I wish to inverse predict the x for y=.75, say. Optimize works fine for a

[R] Adding lines to xyplot with abline

2010-08-19 Thread Jeffrey.Morris
Is it kosher to add, say, horizontal lines to a lattice xyplot using abline(h=xxx)? The lines don't appear at the right value, that is, if h=150, the line might appear at h=140? Jeff This communication, including any attachments, is intended solely for the use of the addressee and may contain