cd2Model: Fit Cobb-Douglas Models

Description Usage Arguments Value Examples

View source: R/Fitting.R

Description

Fit Cobb-Douglas Models

Usage

1
2
cd2Model(formula, data, response, x1, x2, time, constrained = TRUE,
  save.data = TRUE, correlation = NULL, ...)

Arguments

data

a data fram in which formula is evaluated

response

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

x1

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

x2

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

time

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

constrained

a logical indicating whether the parameters are constrained

correlation

an optional nlme::corStruct object describing the within-group correlation structure. See the documentation of nlme::corClasses for a description of the available nlme::corStruct classes. If a grouping variable is to be used, it must be specified in the form argument to the nlme::corStruct constructor. Defaults to NULL, corresponding to uncorrelated errors.

formala

a formual of the form response ~ x1 + x2 + time

Value

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

Examples

1
2
3
4
data(EconUK)
cd2Model(response = iGDP, x1 = iK, x2 = iL, time = iYear, data = EconUK)
cd2Model(iGDP ~ iK + iL + iYear, data = EconUK)
cd2Model(response = "iGDP", x1="iK", x2="iL", time="iYear", data = EconUK)

EconModels/MacroGrowth documentation built on Dec. 17, 2019, 10:41 p.m.