I have some data which follow a nonlinear relationship like that displayed in the plot below. The non-linear data do not come directly from the explicit function written in the code below!

`x1 <- seq(-1,-0.0001,len=500) x2 <- seq(0.0001,1,len=500) df <- data.frame(x=c(x1,x2),y=c(1-0.0001^x1,0.0001^(-x2)-1)) plot(df[,1],df[,2],type="p") `

Given that there are negative values in both `x`

and `y`

, how do I transform such data? Is this even possible? If this is possible, what are the repercussions of such transformation?

**Contents**hide

#### Best Answer

In this problem you have an explicit functional relationship between the two variables:

$$y = text{sgn}(x) (10^{4|x|}-1).$$

You can obtain a linear relationship between transformed variables by using:

$$text{sgn}(y) log_{10}(1+|y|) = 4x.$$

### Similar Posts:

- Solved – How to transform a non-linear relationship to make it linear
- Solved – How to transform a non-linear relationship to make it linear
- Solved – Linear Relationship between Variables using Principal Component Analysis (PCA)
- Solved – How to detect nonlinear relationship
- Solved – Linear main effects and nonlinear interaction