npregHom: Nonparametric Regression with Homogeneity Imposed

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Nonparametric regression with homogeneity of degree zero in some regressors imposed.

Usage

1
2
npregHom( yName, xNames, homWeights, data, restrictGrad = TRUE,
   bws = NULL, ... )

Arguments

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 npreg).

...

further arguments are passed to npreg.

Details

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.

Value

a list of class npregHom containing following objects:

est

the object returned by npreg.

grad

matrix containing the gradients of all regressors.

call

the matched call.

yName

argument yName.

xNames

argument xcNames.

homWeights

argument homWeights.

restrictGrad

argument restrictGrad.

Author(s)

Arne Henningsen

See Also

elas.npregHom, quadFuncEst, npreg, and npregbw.

Examples

 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

micEconNP documentation built on May 2, 2019, 6:30 p.m.