1
$\begingroup$

I have given function values say "$y$" which is dependent on $x$ and $\log(100-x)$, how shall I solve this problem using linear regression - as in I want my model to be like $$y = Ax + B\log(100-x).$$

I could do it by taking $x$ as one variable and $100-x$ as another, but is that wrong?

Is there any other way this could be done using multiple linear regression where $x$ and $\log(100-x)$ are taken as different variables?

Am I committing a mistake by taking $x$ and $\log(100-x)$ as different variables since they are dependent on each other?

How to solve using linear multiple linear regression in R?

$\endgroup$
1

2 Answers 2

5
$\begingroup$

If you really want to construct a model such as $y = A x + B \log(100 - x)$ (that is, you know that is how your model SHOULD perform in real life, e.g., based on some physical or biological or chemical arguments), then just do that by treating $x$ and $\log(100 - x)$ as your covariates and perform a linear regression to estimate the coefficients $A$ and $B$.

$\endgroup$
2
$\begingroup$

Linear regression can be used in some non linear regression problems if you define new variables that contains the non linearity. You should do the linear regression $y=A X +B U$ , where $U = log(100-x)$. There is no mistake in doing that, you are searching a linear regression function adding a dimension to the problem.

For example, if you want to adjust the polynomial $Y=AX^2 +BX +C$, you should define a new variable $U = X^2$, and it isn't any mistake on doing that. It is a very common practice while doing regressions.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.