Skip to content

Follow-up: [R] Inverse prediction with R?

3 messages · Kaspar Pflugshaupt, Martyn Plummer, Bill Simpson

#
(message from 22.2.2000 13:04 Uhr):
Jan,

thanks for the tip, but it's not just the same. The coefficients come out
differently, since the squared y residuals are minimized. Orthogonal
regression would be symmetric, but least squares is not, I'm afraid. And,
what's more, I have to state my model that way since the x values I have got
are fixed. 

Perhaps I have to explain where my problem comes from: I want to measure the
age of trees. I cannot cut them and I can take core samples only from the
bigger ones. What I can measure is the number of bud rings and branchings,
which is proportional to the age, although the measurement is rather
inaccurate. So, I 'd like to model that number based on the core samples
I've got (N?40), which are accurate, and the inversely "predict core
samples" for the rest of my trees (N?300).

Maybe there is another way to do what I intend, but at the moment I've no
clue. I'm grateful for any hint.

 

Kaspar
#
My $0.02.

If y ~ a + b * (x - xbar) where xbar is the mean of the observed x values,
then a 95% confidence region for x given a new value of y may be obtained
by solving the inequality

abs (y - ahat - bhat * (x - xbar)) / 
   sqrt (Var(ahat) + (x - xbar)^2 * Var(bhat)) <= 1.96

where ahat, bhat are your estimates of a and b.  If b is significantly
different from 0 at the 5% level then this is a (usually rather skew)
interval, otherwise it may be the whole real line or two intervals.

As Brian says, this is the calibration problem. Most of the literature on
it comes from technometrics, whic isn't my field.  I found the following
review useful when I looked into this some years ago.

Osborne, C. Statistical Calibration: A Review, Intenational Statistical
Review, 51, 309-336, 1991.

Martyn
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
You fit
y = a+b*x

Then you get the inverse regression estimate

x = (y-a)/b

I don't see what is hard about that.

As for the confidence interval for x, try bootstrapping:
- randomly sample your (x,y) data
- do the y = a+b*x fit
- get the estimate x = (y-a)/b
- use the bootstrapped x distribution to get your CI

Or use the formulas you saw in a book.

I don't see this as a hard programming project. (I am no ace R programmer
myself)

Bill

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._