Correctness of Performing Logistic Regression in reverse to a Linear Regression Model (swapping independent and dependent variables) Linear regression is used as follows:
lm(Continuous1 ~ Factor_3Level * Factor_2Level, data = Data1)

What are the problems following this up with this:
glm(Factor_2Level ~ Continuous1 + Factor_3Level, data = Data1, family = "binomial")

The variable names describe the data types. Factor_3Level and Factor_2Level are independent. The results from lm() are that both factors are significant, the interaction term is not significant ($p=.23$), and the R-squared is $0.34$.
Continous1 was measured under test conditions, where each combination of the levels of the two factors (six possibilities) was tested 25 times. (These two factors were physically altered for the test.)  The assumptions of linear regression are satisfied. Continous1 does not "exist" without the two factors having values.  It is assumed there are multiple unknown environmental factors which also affect Continuous1 (which are difficult to identify and/or measure).
I think independence is violated by using logistic regression this way. As Factor_2Level is tied to the conditions of the original test. The regression will probably be significant, but I don't think the r-squared will be accurate. Is that correct? Is there a different reason a test like this should not be done in reverse? What is the name of the related principal?  In reverse, the independent variables can't be causing the dependent variable, rather the model predicts what state the dependent variable is in.
Insofar as a concrete example is required, consider the following. The behavior of animal K1 in a wildlife park is being measured, such as pacing/hour (times around the perimeter). The manipulated variables are the presence of a neighboring animal, V2, in a certain extended area, which can be selected for with a gate (and waiting briefly), and the selection can be done on a rainy day, sunny day, or cloudy day.  If the park officials don't know whether V2 is present in the neighboring area, can the pacing rate of K1, given that it's sunny (the most significant factors from the earlier multiple regression test study) give them a good idea?
This question is about the validity of manipulating or selecting for an environmental variable, and then turning around and trying to predict that variable.  This question is not about the example.
 A: Welcome to Cross Validated!
Here are some thoughts:

*

*Because correlation is not the same as causation, without knowing a priori that there is a single, known causal direction, there is no reason why cannot consider any variable as the response variable. Only further experimentation can tell you if there is a distinct causal direction.


*p = 0.23 does NOT mean that two variables "do not interact." It only means that you don't have enough evidence to reject the null hypothesis of zero slope in your particular model, with your particular data. Something to drill in your head over and over is that a non-significant p-value does not prove no effect. Your hypothesis test is only constructed to either reject or fail to reject the null hypothesis of no effect.


*It is perfectly reasonable to run your model in two directions. Such situations occur all of the time. Does the presence of a chemical in the blood cause a condition or result from it? Or, do both result from some other cause? There are, of course, things that cannot be response variables, such as the genotype of a subject.
Additional tips:

*

*Look for additional variables that you might need to include in your model.

*Do a lot of exploratory analysis. Make sure you study your data visually.

*Do all of the requisite regression diagnostics to make sure your data and model conform to the assumptions of the type of regression you are performing.

I hope this helps.
Continued based on additional information from OP

*

*If factor_3Level and factor_2Level are independent, it could still make sense to include one as a predictor and one as an outcome if one acts as an effect modifier of continuous.

However...


*If I understand correctly, you experimentally adjusted factor_2Level and factor_3Level, and then measured continuous. In this case, perhaps I was wrong to say that you could consider any variable as the outcome. I was thinking in terms of observational data.


*I think what you have is a straightforward two-way (2x3) ANOVA model continuous ~ factor_3Level*factor_2Level. Of course, that is roughly equivalent to linear regression, but you would want to handle multiple comparisons differently (e.g. Tukey, Bonferroni).


*Regarding the assumptions, after you run lm you need to look at the residuals, qq plot, etc. Regression diagnostics.
Is that more helpful than before?
More based on information from comments
Consider the problem:

The gate is behind a screen and you don't know if it is open or not. You observe the animal pacing and want to predict if the gate is open or closed.

Yes, you could definitely perform logistic regression of gate (open/closed) on weather, pacing gate ~ pacing + weather. This amounts to asking a specific statistical question: Can I categorize the gate state by observing weather and pacing.
That being said, from the little I know of Bayesian statistics, that may be a better framework. But logistic regression would be a good start nevertheless.
Alternatively, you could consider other classification methods from the machine learning repertoire such as Bayes nets or discriminant analysis. I can't be much help with that.
A: 
What are the problems following this up with this

If there are any problems, I think they are scientific.  In the first model, what you are modelling is the outcome, let's call it $y$, given the two factors $x$ and $z$.  The data generating process would be

*

*Draw jointly $x$ and $z$.  You claim they are independent so this is the same as drawing $x$ then $z$ or vice versa.


*Use both $x$ and $z$ to draw $y$.  The model you've written down is a model for $y \vert x,z$.
However the second model would be a model for $z \vert y,z$ which is at odds with the first model's data generating process.  In the first model you say that $z$ can be used to draw $y$ where as in the second $y$ is used to draw $z$.  Statistically, not a problem because the three variables have some joint distribution and factoring that distribution anyway you like is mathematically allowed, but scientifically it would give me some pause.
Can you speak more about what these variables represent?
A: There are a number of issues here

*

*are you even certain you are doing a logistic regression? Assuming that is R, you’ve not specified the link function and i don’t know your data types


*if you are doing correlation, do correlation. If you are doing glm, do glm. Each method has accepted practice of follow up comparisons (regression = regression contrasts, glm = Tukey, Scheffe, etc etc). Mixing and matching is a quagmire.


*I suspect, but cannot prove, you’ve messed with your actual Alpha rate.
