Fit Cobb-Douglas models

cdModel(formula, data, response, x1, x2, x3, time, constrained = TRUE,
  save.data = TRUE, correlation = NULL, ...)

Arguments

data

a data frame in which formula is evaluated

response

instead of specifying a formula, expressions for the components can be specified individually.

x1

instead of specifying a formula, expressions for the components can be specified individually.

x2

instead of specifying a formula, expressions for the components can be specified individually.

x3

instead of specifying a formula, expressions for the components can be specified individually.

time

instead of specifying a formula, expressions for the components can be specified individually.

constrained

a logical indicating whether the parameters should be constrained in the fitting process.

formala

a formula of the form response ~ x1 + x2 + time or response ~ x1 + x2 + x3 + time

Value

a CDEmodel object, which is an lm object with some additioanl attributes.

Examples

data(EconUK) cdModel(response = "iGDP", x1 = "iK", x2 = "iL", time = "iYear", data = EconUK)
#> Generalized least squares fit by REML #> Model: log(iGDP) - log(iL) ~ I(log(iK) - log(iL)) + iYear #> Data: sdata #> Log-restricted-likelihood: 110.7822 #> #> Coefficients: #> logscale alpha_1 lambda #> -0.001552367 0.535182020 0.011122525 #> #> Degrees of freedom: 51 total; 48 residual #> Residual standard error: 0.02126305
cdModel(iGDP ~ iK + iL + iYear, data = EconUK)
#> Generalized least squares fit by REML #> Model: log(iGDP) - log(iL) ~ I(log(iK) - log(iL)) + iYear #> Data: sdata #> Log-restricted-likelihood: 110.7822 #> #> Coefficients: #> logscale alpha_1 lambda #> -0.001552367 0.535182020 0.011122525 #> #> Degrees of freedom: 51 total; 48 residual #> Residual standard error: 0.02126305