Value of independent variable based on a particular linear model or otherwise Is it possible to use R to predict the input or independent variables that lead to a particular value of the dependent variable? I have a linear model relating three input variables to a dependent variable. However, I would like to inverse the model so that now I can use it to predict the input variables. My inkling is that it isn't possible with 3 input variables.
 A: It's certainly possible to find a solution - in fact, an infinite number of them!
With a linear model in 1 variable, you can find a particular $x$ that will produce a particular $\hat y$, $\hat{y}_0$:
$\hat y_0 = \hat{\beta}_0 + \hat{\beta}_1 x_0$
can be recast as $x_0 = (\hat y_0 - \hat{\beta}_0) / \hat{\beta}_1$
(Even when you have a nonlinear model in 1 variable, it's essentially root-finding; that, too, may have a solution - one or more $x$'s that produce a given $\hat y$.)
However, when you have multiple predictors, even in a linear model with p-predictors, such as a linear regression, you don't get a particular solution, you get a subspace - an infinite, $p-1$ - dimensional space of solutions.
e.g. consider a multiple regression with two predictors.
$\hat y = \hat{\beta}_0 + \hat{\beta}_1 x_1+ \hat{\beta}_2 x_2$
Can we find $(x_{1,0},x_{2,0})$ which yields a particular $y_0$?
Yes, an infinite number of them. For any $x_{1,0}$, we can find a solution for $x_{2,0}$, since
$\hat{y}_0 = \hat{\beta}_0 + \hat{\beta}_1 x_{1,0}+ \hat{\beta}_2 x_{2,0}$
can be recast as:
$x_{2,0}=(\hat{y}_0 - \hat{\beta}_0 - \hat{\beta}_1 x_{1,0})/ \hat{\beta}_2 $
so the solution space is $(x_{1,0},(\hat{y}_0 - \hat{\beta}_0 - \hat{\beta}_1 x_{1,0})/ \hat{\beta}_2 )$
This is just a straight line in $(x_1,x_2)$ space. That this happens is no surprise at all, since the original fitted equation is a plane in $(x_1,x_2,\hat{y})$-space, and by specifying an output value, $\hat{y}_0$, you're just taking a horizontal slice, cutting (almost always*) across your fitted plane in a line.
* i.e. when the fitted plane isn't horizontal
You can do the same trick with more variables: freely specify $p-1$ of your $p$ predictors to be anything you like, and solve for the remaining one.
A: You have to build another model to predict your input variable.. Simple inverse or any other trick on the existing model won't work.
