Description Usage Arguments Details Value Author(s) See Also Examples
Nonparametric regression with homogeneity of degree zero in some regressors imposed.
1 2 |
yName |
a character string containing the name of the dependent variable. |
xNames |
a vector of strings containing the names of the independent 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). |
data |
data frame containing the data. |
restrictGrad |
logical value indicating whether the sum of the gradients of all normalized variables should be restricted to be zero? (see details). |
bws |
bandwidths (see |
... |
further arguments are passed to |
Argument homWeights
is used to impose homogeneity of degree
zero in some (continuous) independent 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 = d P / d P_i)
is not really its weight
(
( d P / d P_i ) ( P_i / P )),
in particular,
if the numerical values of the variables (P_1, …, P_n)
are rather different.
The variables that are normalized with the weighted index of theses variables
are linearly dependent.
Hence, a model that includes these variables cannot be estimated
by standard econometric methods such as OLS.
To allow the estimation of this model by standard econometric methods,
the sum of the gradients (=coefficients) of the normalized variables
is generally restricted to zero.
If argument restrictGrad
is TRUE
,
this is done also by npregHom
.
In contrast to OLS results that do not depend on
which variable is eliminated by the restriction,
the results of npregHom
depend on
which variable is eliminated by the restriction.
The variable that corresponds to the first weight
in argument homWeights
is eliminated in npregHom
.
a list of class npregHom
containing following objects:
est |
the object returned by |
grad |
matrix containing the gradients of all regressors. |
call |
the matched call. |
yName |
argument |
xNames |
argument |
homWeights |
argument |
restrictGrad |
argument |
Arne Henningsen
elas.npregHom
, quadFuncEst
,
npreg
, and npregbw
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 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)
# weights to impose
weights <- c(
pOutput = mean( germanFarms$qOutput ),
pVarInput = mean( germanFarms$qVarInput ),
pLabor = mean( germanFarms$qLabor ) )
weights <- weights / sum( weights )
# estimate an input demand function
estResult <- npregHom( "qVarInput",
xNames = c( "pOutput", "pVarInput", "pLabor", "land" ),
data = germanFarms, homWeights = weights )
estResult$grad
# estimate an input demand function using the Epanechnikov kernel
estResultEpa <- npregHom( "qVarInput",
xNames = c( "pOutput", "pVarInput", "pLabor", "land" ),
data = germanFarms, homWeights = weights, ckertype="epanechnikov" )
estResultEpa$grad
# estimate an input demand function with manual bandwidths selection
estResultMan <- npregHom( "qVarInput",
xNames = c( "pOutput", "pVarInput", "pLabor", "land" ),
data = germanFarms, homWeights = weights, bws = rep( 1, 3 ),
bwscaling = TRUE )
estResultMan$grad
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.