Fit LINEX models

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

Arguments

formula

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

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.

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.

Examples

data(EconUK) linexModel(iGDP ~ iK + iL + iXp + iYear, data = EconUK)
#> Generalized least squares fit by REML #> Model: log(iGDP) - log(iXp) ~ I(2 * (1 - 1/(iK/(0.5 * (iXp + iL))))) + I(iL/iXp - 1) #> Data: data #> Log-restricted-likelihood: 76.07256 #> #> Coefficients: #> (Intercept) I(2 * (1 - 1/(iK/(0.5 * (iXp + iL))))) #> -0.06059558 1.12151710 #> I(iL/iXp - 1) #> 2.12109354 #> #> Degrees of freedom: 51 total; 48 residual #> Residual standard error: 0.04765261
linexModel(response = "iGDP", x1="iK", x2="iL", x3="iXp", time="iYear", data = EconUK)
#> Generalized least squares fit by REML #> Model: log(iGDP) - log(iXp) ~ I(2 * (1 - 1/(iK/(0.5 * (iXp + iL))))) + I(iL/iXp - 1) #> Data: data #> Log-restricted-likelihood: 76.07256 #> #> Coefficients: #> (Intercept) I(2 * (1 - 1/(iK/(0.5 * (iXp + iL))))) #> -0.06059558 1.12151710 #> I(iL/iXp - 1) #> 2.12109354 #> #> Degrees of freedom: 51 total; 48 residual #> Residual standard error: 0.04765261
naturalCoef(linexModel(response = "iGDP", x1="iK", x2="iL", x3="iXp", time="iYear", data = EconUK))
#> logscale scale a_0 a_1 c_t #> 1 -0.06059558 0.9412038 1.121517 2.121094 1.891272