quadFuncEst {micEcon} | R Documentation |
Estimate a quadratic function
Description
Estimate a quadratic function.
Usage
quadFuncEst( yName, xNames, data, shifterNames = NULL,
linear = FALSE, homWeights = NULL,
regScale = 1, ... )
Arguments
yName |
a character string containing the name of the dependent variable. |
xNames |
a vector of strings containing the names of the independent variables. |
data |
data frame containing the data
(possibly a panel data frame created with
|
shifterNames |
a vector of strings containing the names of the independent variables that should be included as shifters only (not in quadratic or interaction terms). |
linear |
logical. Restrict the coefficients of all quadratic and interaction terms to be zero so that the estimated function is linear in the exogenous variables? |
homWeights |
numeric vector with named elements that are weighting factors for calculating an index that is used to normalize the variables for imposing homogeneity of degree zero in these variables (see details). |
regScale |
a scalar or vector with length equal to |
... |
Details
If argument homWeights
is used to impose homogeneity of degree
zero in some variables,
the weighting factors in this vector must have names
that are equal to the variable names in argument xNames
.
The order of the elements in homWeights
is arbitrary and may or may not be equal
to the order of the elements in xNames
.
Argument homWeights
may contain less elements
than xNames
;
in this case, homogeneity of degree zero is imposed only
on variables with names in homWeights
.
Please note that the weighting factor of a variable
(P_i
) in homWeights
(w_i = \partial P / \partial P_i
)
is not really its weight
(( \partial P / \partial P_i ) ( P_i / P )
),
in particular,
if the numerical values of the variables (P_1, \ldots, P_n
)
are rather different.
Value
a list of class quadFuncEst
containing following objects:
est |
|
nExog |
length of argument |
nShifter |
length of argument |
residuals |
residuals. |
fitted |
fitted values. |
coef |
vector of all coefficients. |
coefCov |
covariance matrix of all coefficients. |
r2 |
|
r2bar |
adjusted |
nObs |
number of observations. |
model.matrix |
the model matrix. |
call |
the matched call. |
yName |
argument |
xNames |
argument |
shifterNames |
argument |
homWeights |
argument |
regScale |
argument |
Author(s)
Arne Henningsen
See Also
quadFuncCalc
, quadFuncDeriv
,
translogEst
and snqProfitEst
.
Examples
data( germanFarms )
# output quantity:
germanFarms$qOutput <- germanFarms$vOutput / germanFarms$pOutput
# quantity of variable inputs
germanFarms$qVarInput <- germanFarms$vVarInput / germanFarms$pVarInput
# a time trend to account for technical progress:
germanFarms$time <- c(1:20)
# estimate a quadratic production function
estResult <- quadFuncEst( "qOutput", c( "qLabor", "land", "qVarInput", "time" ),
germanFarms )
coef( estResult )
estResult$r2