How to perform exponential regression with more than one predictors using R

Fitting exponential regression of form $y=ab^{x_1}c^{x_2}$ Here $x_1$ and $x_2$ are predictors and $y$ is dependent variable how to calculate $a,b,c$ using R tool

• Are you expecting the errors to be additive ($y=ab^{x_1}c^{x_2}+\epsilon$) or multiplicative ($y=ab^{x_1}c^{x_2}\epsilon$)? Jan 6, 2013 at 4:49

If the model is: log(y) ~ a + b*X1 + c*X2 with Poisson errors, .... then it would be as simple as:

glm( y ~ X1 + X2, data = dfrm, family="poisson")


You could get one kind of "additive" model with:

glm( log(y) ~ X1+X2, data=dfrm, family="gaussian")

• Considering additive errors,Model that is to be fit is y=ay=ab^(x1)c^(x2) and if this equation is being log trransformed then for zeros in dataset R cannot generate equation as log(0) becomes infinity. Jan 6, 2013 at 5:03
• Then look at ?nls.
– DWin
Jan 6, 2013 at 5:06
• you can use glm(y ~X1+X2, data=dfrm, family=gaussian(link="log")); log-transformation is not involved ... Jan 6, 2013 at 16:51
• ... and the statistical model is actually Y~Poisson(lambda=exp(a+b*log(X1)+c*log(X2))) (equivalent to lambda=exp(a)*X1^b*X2^c), so that should be glm(y~log(X1)+log(X2), ...) Jan 6, 2013 at 16:56