snqProfitEst: Estimation of a SNQ Profit function

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

View source: R/snqProfitEst.R

Description

Estimation of a Symmetric Normalized Quadratic (SNQ) Profit function.

Usage

1
2
3
4
snqProfitEst( priceNames, quantNames, fixNames = NULL, instNames = NULL,
   data, form = 0, base = 1, scalingFactors = NULL,
   weights = snqProfitWeights( priceNames, quantNames, data, "DW92", base = base ),
   method = ifelse( is.null( instNames ), "SUR", "3SLS" ), ... )

Arguments

priceNames

a vector of strings containing the names of netput prices.

quantNames

a vector of strings containing the names of netput quantities (inputs must be negative).

fixNames

an optional vector of strings containing the names of the quantities of (quasi-)fixed inputs.

instNames

an optional vector of strings containing the names of instrumental variables (for 3SLS estimation).

data

a data frame containing the data.

form

the functional form to be estimated (see details).

base

the base period(s) for scaling prices (see details). If argument weights is not specified, argument base is also used to obtain the weights for normalizing prices (see snqProfitWeights).

scalingFactors

a vector of factors to scale prices (see details).

weights

a vector of weights for normalizing prices.

method

the estimation method (passed to systemfit).

...

arguments passed to systemfit

Details

The Symmetric Normalized Quadratic (SNQ) profit function is defined as follows (this functional form is used if argument form equals 0):

π ≤ft( p, z \right) = ∑_{i=1}^{n} α_{i} p_{i} + \frac{1}{2} w^{-1} ∑_{i=1}^{n} ∑_{j=1}^{n} β_{ij} p_{i} p_{j} + ∑_{i=1}^{n} ∑_{j=1}^{m} δ_{ij} p_{i} z_{j} + \frac{1}{2} w ∑_{i=1}^{m} ∑_{j=1}^{m} γ_{ij} z_{i} z_{j}

with π = profit, p_i = netput prices, z_i = quantities of fixed inputs, w=∑_{i=1}^{n}θ_{i}p_{i} = price index for normalization, θ_i = weights of prices for normalization, and α_i, β_{ij}, δ_{ij} and γ_{ij} = coefficients to be estimated.
The netput equations (output supply in input demand) can be obtained by Hotelling's Lemma ( q_{i} = ≤ft. \partial π \right/ \partial p_{i} ):

x_{i} = α_{i} + w^{-1} ∑_{j=1}^{n} β_{ij} p_{j} - \frac{1}{2} θ_{i} w^{-2} ∑_{j=1}^{n} ∑_{k=1}^{n} β_{jk} p_{j} p_{k} + ∑_{j=1}^{m} δ_{ij} z_{j} + \frac{1}{2} θ_{i} ∑_{j=1}^{m} ∑_{k=1}^{m} γ_{jk} z_{j} z_{k}

In my experience the fit of the model is sometimes not very good, because the effect of the fixed inputs is forced to be proportional to the weights for price normalization θ_i. In this cases I use following extended SNQ profit function (this functional form is used if argument form equals 1):

π ≤ft( p, z \right) = ∑_{i=1}^{n} α_{i} p_{i} + \frac{1}{2} w^{-1} ∑_{i=1}^{n} ∑_{j=1}^{n} β_{ij} p_{i} p_{j} + ∑_{i=1}^{n} ∑_{j=1}^{m} δ_{ij} p_{i} z_{j} + \frac{1}{2} ∑_{i=1}^{n} ∑_{j=1}^{m} ∑_{k=1}^{m} γ_{ijk} p_i z_{j} z_{k}

The netput equations are now:

x_{i} = α_{i} + w^{-1} ∑_{j=1}^{n} β_{ij} p_{j} - \frac{1}{2} θ_{i} w^{-2} ∑_{j=1}^{n} ∑_{k=1}^{n} β_{jk} p_{j} p_{k} + ∑_{j=1}^{m} δ_{ij} z_{j} + \frac{1}{2} ∑_{j=1}^{m} ∑_{k=1}^{m} γ_{ijk} z_{j} z_{k}

Argument scalingFactors can be used to scale prices, e.g. for improving the numerical stability of the estimation (e.g. if prices are very large or very small numbers) or for assessing the robustness of the results when changing the units of measurement. The prices are multiplied by the scaling factors, while the quantities are divided my the scaling factors so that the monetary values of the inputs and outputs and thus, the profit, remains unchanged. If argument scalingFactors is NULL, argument base is used to automatically obtain scaling factors so that the scaled prices are unity in the base period or - if there is more than one base period - that the means of the scaled prices over the base periods are unity. Argument base can be either
(a) a single number: the row number of the base prices,
(b) a vector indicating several observations: The means of these observations are used as base prices,
(c) a logical vector with length equal to the number of rows of the data set that is specified by argument data: The means of the observations indicated as 'TRUE' are used as base prices, or
(d) NULL: prices are not scaled. If argument base is NULL, argument weights must be specified, because the weights cannot be calculated if the base period is not specified. An alternative way to use unscaled prices is to set argument scalingFactors equal to a vector of ones (see examples below).
If the scaling factors are explicitly specified by argument scalingFactors, argument base is not used for obtaining scaling factors (but it is used for obtaining weights if argument weights is not specified).

Value

a list of class snqProfitEst containing following objects:

coef

a list containing the vectors/matrix of the estimated coefficients:
* alpha = α_i.
* beta = β_{ij}.
* delta = δ_{ij} (only if quasi-fix inputs are present).
* gamma = γ_{ij} (only if quasi-fix inputs are present).
* allCoef = vector of all coefficients.
* allCoefCov = covariance matrix of all coefficients.
* stats = all coefficients with standard errors, t-values and p-values.
* liCoef = vector of linear independent coefficients.
* liCoefCov = covariance matrix of linear independent coefficients.

ela

a list of class snqProfitEla that contains (amongst others) the price elasticities at mean prices and mean quantities (see snqProfitEla).

fixEla

matrix of the fixed factor elasticities at mean prices and mean quantities.

hessian

hessian matrix of the profit function with respect to prices evaluated at mean prices.

convexity

logical. Convexity of the profit function.

r2

R^2-values of all netput equations.

est

estimation results returned by systemfit.

weights

the weights of prices used for normalization.

normPrice

vector used for normalization of prices.

data

data frame of originally supplied data.

fitted

data frame that contains the fitted netput quantities and the fitted profit.

pMeans

means of the scaled netput prices.

qMeans

means of the scaled netput quantities.

fMeans

means of the (quasi-)fixed input quantities.

priceNames

a vector of strings containing the names of netput prices.

quantNames

a vector of strings containing the names of netput quantities (inputs must be negative).

fixNames

an optional vector of strings containing the names of the quantities of (quasi-)fixed inputs.

instNames

an optional vector of strings containing the names of instrumental variables (for 3SLS estimation).

form

the functional form (see details).

base

the base period(s) for scaling prices (see details).

weights

vector of weights of the prices for normalization.

scalingFactors

factors to scale prices (and quantities).

method

the estimation method.

Author(s)

Arne Henningsen

References

Diewert, W.E. and T.J. Wales (1987) Flexible functional forms and global curvature conditions. Econometrica, 55, p. 43-68.

Diewert, W.E. and T.J. Wales (1992) Quadratic Spline Models for Producer's Supply and Demand Functions. International Economic Review, 33, p. 705-722.

Kohli, U.R. (1993) A symmetric normalized quadratic GNP function and the US demand for imports and supply of exports. International Economic Review, 34, p. 243-255.

See Also

snqProfitEla and snqProfitWeights.

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
   data( germanFarms, package = "micEcon" )
   germanFarms$qOutput   <- germanFarms$vOutput / germanFarms$pOutput
   germanFarms$qVarInput <- -germanFarms$vVarInput / germanFarms$pVarInput
   germanFarms$qLabor    <- -germanFarms$qLabor
   priceNames <- c( "pOutput", "pVarInput", "pLabor" )
   quantNames <- c( "qOutput", "qVarInput", "qLabor" )

   estResult <- snqProfitEst( priceNames, quantNames, "land", data = germanFarms )
   estResult$ela   # Oh, that looks bad!

   # it it reasonable to account for technological progress
   germanFarms$time <- c( 0:19 )
   estResult2 <- snqProfitEst( priceNames, quantNames, c("land","time"), 
      data = germanFarms )
   estResult2$ela   # Ah, that looks better!
   
   # estimation with unscaled prices
   estResultNoScale <- snqProfitEst( priceNames, quantNames, c("land","time"), 
    data = germanFarms, scalingFactors = rep( 1, 3 ) )
   print( estResultNoScale )
   
   # alternative way of estimation with unscaled prices
   estResultNoScale2 <- snqProfitEst( priceNames, quantNames, c("land","time"), 
      data = germanFarms, base = NULL, 
      weights = snqProfitWeights( priceNames, quantNames, germanFarms ) )
   all.equal( estResultNoScale[-20], estResultNoScale2[] )

   # please note that the SNQ Profit function is not invariant
   # to units of measurement so that different scaling factors 
   # result in different estimates of elasticities:
   all.equal( estResult2$ela, estResultNoScale$ela )

micEconSNQP documentation built on Feb. 11, 2020, 3 p.m.