quadFuncEst: Estimate a quadratic function

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

View source: R/quadFuncEst.R

Description

Estimate a quadratic function.

Usage

1
2
3
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 pdata.frame).

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 nrow( data ). All regressors except for shifter variables that are logical or factors are divided by regScale (NOTE: quadratic and interaction terms are also divided by regScale and NOT divided by the square of regScale).

...

further arguments are passed to lm or plm.

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 = 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.

Value

a list of class quadFuncEst containing following objects:

est

the object returned by lm or plm.

nExog

length of argument xNames.

nShifter

length of argument shifterNames.

residuals

residuals.

fitted

fitted values.

coef

vector of all coefficients.

coefCov

covariance matrix of all coefficients.

r2

R^2 value.

r2bar

adjusted R^2 value.

nObs

number of observations.

model.matrix

the model matrix.

call

the matched call.

yName

argument yName.

xNames

argument xNames.

shifterNames

argument shifterNames.

homWeights

argument homWeights.

regScale

argument regScale.

Author(s)

Arne Henningsen

See Also

quadFuncCalc, quadFuncDeriv, translogEst and snqProfitEst.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
   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

micEcon documentation built on Jan. 7, 2021, 3:01 p.m.

Related to quadFuncEst in micEcon...