If I have theoretical reasons to suppose the data might be fit with an unusual equation such as the following:
$$Y_i = (\beta_0 + \beta_1x_{1i} + \beta_2x_{2i} + \epsilon_i)^{\beta_3}$$
Can I use Ordinary Least Squares Multiple Linear Regression after a transformation to estimate parameters $\beta{_0,_1,_2,_3}$? If yes, what transformation?
If not, is there some specialized package in R (and brief reading) that might help me compare the fit and residuals from this model against a more typical MLR model?
Thanks.
Example Code:
## while I can run "nls," I cannot get $\epsilon$ inside parentheses nor
## can I have four BETAs
var1 <- rnorm(50, 100, 1)
var2 <- rnorm(50, 120, 2)
var3 <- rnorm(50, 500, 5)
## make a model without $\beta_1$ and $\beta_2$ and with $\epsilon_i$ on outside
nls(var3 ~ (a + var1 + var2)^b, start = list(a = 0.12345, b = 0.54321))
Nonlinear regression model
model: var3 ~ (a + var1 + var2)^b
data: parent.frame()
a b
475.5234 0.9497
residual sum-of-squares: 1365
Number of iterations to convergence: 6
Achieved convergence tolerance: 8.332e-08
## FAILS with exponent on left-hand side and $\epsilon$ inside parentheses
nls(var3^(1/b) ~ (a + var1 + var2), start = list(a = 0.12345, b = 0.54321))
Error in eval(expr, envir, enclos) : object 'b' not found
## FAILS with all BETAs
nls(var3 ~ (a + b*var1 + c*var2)^d, start = list(a = 4, b = 1, c = 1, d = 1))
Error in numericDeriv(form[[3L]], names(ind), env) :
Missing value or an infinity produced when evaluating the model