Skip to main content
Post Closed as "Duplicate" by whuber regression
Bumped by Community user
edited tags
Link
Remy
  • 1.8k
  • 14
  • 25
added 827 characters in body
Source Link
Remy
  • 1.8k
  • 14
  • 25

I have the model

$$y=\beta_1 e^{\beta_2 x}+\beta_3 z+\epsilon$$

where $z$ is an indicator variable. I need to obtain estimates from linear regression to get initial values for the parameters. Then I can do an iterative search to find the best values for each parameter. However, I am having trouble doing this.

For the model

$$y=\beta_1 e^{\beta_2 x}+\epsilon$$

I can simply take the natural log of both sides and run the regression model

$$log(y)=log(\beta_1)+\beta_2 x+\epsilon$$

to get estimates of $\beta_1$ and $\beta_2$ but

$$y=\beta_1 e^{\beta_2 x}+\beta_3 z+\epsilon$$

doesn't appear to be intrinsically linear.

Any suggestions would be greatly appreciated.

Edit:

The data is as follows

df <- read.table(textConnection(
'x y z log_y
0.5 0.68 0  -0.38566
0.5 1.58 1  0.45742
1.0 0.45 0  -0.79851
1.0 2.66 1  0.97833
2.0 2.50 0  0.91629
2.0 2.04 1  0.71295
4.0 6.19 0  1.82294
4.0 7.85 1  2.06051
8.0 56.10 0 4.02714
8.0 54.20 1 3.99268
9.0 89.80 0 4.49758
9.0 90.20 1 4.50203
10.0 147.70 0 4.99518
10.0 146.30 1 4.98566'), header = TRUE)

When the model is just $y=\beta_1 e^{\beta_2 x}$ I get parameters estimates of 0.753 and 0.533 respectively after transforming the data to be linear. In SAS, I used these as the initial values for the new model and let $\beta_3=0$, arbitrarily. Using the Gaussian-Newton method, I got that the convergence criterion was met so it may be a valid approach. The coefficients I obtained in SAS are as follows:

enter image description here

I have the model

$$y=\beta_1 e^{\beta_2 x}+\beta_3 z+\epsilon$$

where $z$ is an indicator variable. I need to obtain estimates from linear regression to get initial values for the parameters. Then I can do an iterative search to find the best values for each parameter. However, I am having trouble doing this.

For the model

$$y=\beta_1 e^{\beta_2 x}+\epsilon$$

I can simply take the natural log of both sides and run the regression model

$$log(y)=log(\beta_1)+\beta_2 x+\epsilon$$

to get estimates of $\beta_1$ and $\beta_2$ but

$$y=\beta_1 e^{\beta_2 x}+\beta_3 z+\epsilon$$

doesn't appear to be intrinsically linear.

Any suggestions would be greatly appreciated.

I have the model

$$y=\beta_1 e^{\beta_2 x}+\beta_3 z+\epsilon$$

where $z$ is an indicator variable. I need to obtain estimates from linear regression to get initial values for the parameters. Then I can do an iterative search to find the best values for each parameter. However, I am having trouble doing this.

For the model

$$y=\beta_1 e^{\beta_2 x}+\epsilon$$

I can simply take the natural log of both sides and run the regression model

$$log(y)=log(\beta_1)+\beta_2 x+\epsilon$$

to get estimates of $\beta_1$ and $\beta_2$ but

$$y=\beta_1 e^{\beta_2 x}+\beta_3 z+\epsilon$$

doesn't appear to be intrinsically linear.

Any suggestions would be greatly appreciated.

Edit:

The data is as follows

df <- read.table(textConnection(
'x y z log_y
0.5 0.68 0  -0.38566
0.5 1.58 1  0.45742
1.0 0.45 0  -0.79851
1.0 2.66 1  0.97833
2.0 2.50 0  0.91629
2.0 2.04 1  0.71295
4.0 6.19 0  1.82294
4.0 7.85 1  2.06051
8.0 56.10 0 4.02714
8.0 54.20 1 3.99268
9.0 89.80 0 4.49758
9.0 90.20 1 4.50203
10.0 147.70 0 4.99518
10.0 146.30 1 4.98566'), header = TRUE)

When the model is just $y=\beta_1 e^{\beta_2 x}$ I get parameters estimates of 0.753 and 0.533 respectively after transforming the data to be linear. In SAS, I used these as the initial values for the new model and let $\beta_3=0$, arbitrarily. Using the Gaussian-Newton method, I got that the convergence criterion was met so it may be a valid approach. The coefficients I obtained in SAS are as follows:

enter image description here

deleted 3 characters in body
Source Link
Remy
  • 1.8k
  • 14
  • 25

I have the model

$$y=\beta_1 e^{\beta_2 x}+\beta_3 z+\epsilon$$

where $z$ is an indicator variable. I need to obtain estimates from linear regression to get initial values for the parameters. Then I can do an iterative search to find the best values for each parameter. However, I am having trouble doing this.

For the model

$$y=\beta_1 e^{\beta_2 x}+\epsilon$$

I can simply take the natural log of both sides and run the regression model

$$log(y)=log(\beta_1)+\beta_2 x+\epsilon$$

to get estimates of $\beta_1$ and $\beta_2$

  but

$$y=\beta_1 e^{\beta_2 x}+\beta_3 z+\epsilon$$

doesn't appear to be intrinsically linear.

Any suggestions would be greatly appreciated.

I have the model

$$y=\beta_1 e^{\beta_2 x}+\beta_3 z+\epsilon$$

where $z$ is an indicator variable. I need to obtain estimates from linear regression to get initial values for the parameters. Then I can do an iterative search to find the best values for each parameter. However, I am having trouble doing this.

For the model

$$y=\beta_1 e^{\beta_2 x}+\epsilon$$

I can simply take the natural log of both sides and run the regression model

$$log(y)=log(\beta_1)+\beta_2 x+\epsilon$$

to get estimates of $\beta_1$ and $\beta_2$

  but

$$y=\beta_1 e^{\beta_2 x}+\beta_3 z+\epsilon$$

doesn't appear to be intrinsically linear.

Any suggestions would be greatly appreciated.

I have the model

$$y=\beta_1 e^{\beta_2 x}+\beta_3 z+\epsilon$$

where $z$ is an indicator variable. I need to obtain estimates from linear regression to get initial values for the parameters. Then I can do an iterative search to find the best values for each parameter. However, I am having trouble doing this.

For the model

$$y=\beta_1 e^{\beta_2 x}+\epsilon$$

I can simply take the natural log of both sides and run the regression model

$$log(y)=log(\beta_1)+\beta_2 x+\epsilon$$

to get estimates of $\beta_1$ and $\beta_2$ but

$$y=\beta_1 e^{\beta_2 x}+\beta_3 z+\epsilon$$

doesn't appear to be intrinsically linear.

Any suggestions would be greatly appreciated.

added 104 characters in body
Source Link
Remy
  • 1.8k
  • 14
  • 25
Loading
Source Link
Remy
  • 1.8k
  • 14
  • 25
Loading