Learn R Programming

micEconSNQP (version 0.6-10)

snqProfitWeights: SNQ Profit function: Weights of prices for normalization

Description

Returns a vector of weights to normalize prices on a Symmetric Normalized Quadratic (SNQ) Profit function.

Usage

snqProfitWeights( priceNames, quantNames, data, method = "DW92", base = 1 )

Arguments

priceNames

a vector of strings containing the names of netput prices.

quantNames

a vector of strings containing the names of netput quantities.

data

a data frame containing the data.

method

the method to determine the weights (see details).

base

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

Details

If argument method is 'DW92' the method of Diewert and Wales (1992) is applied. They predetermine the weights by $$ \theta_{i} = \frac{ \displaystyle \left | \overline{x}_{i} \right| p_{i}^{0} }{ \displaystyle \sum_{i=1}^{n} \left| \overline{x}_{i} \right| p_{i}^{0}}$$

Defining the scaled netput quantities as \(\widetilde{x}_{i}^{t} = x_{i}^{t}\cdot p_{i}^{0}\) we get following formula:

$$ \theta_{i} = \frac{ \displaystyle \left| \overline{ \widetilde{ x } }_{i} \right|}{ \displaystyle \sum_{i=1}^{n} \left| \overline{ \widetilde{ x } }_{i} \right|}$$

The prices are scaled that they are unity in the base period or - if there is more than one base period - that the means of the prices over the base periods are unity. The 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 the same length as the data: The means of the observations indicated as 'TRUE' are used as base prices, or (d) NULL: prices are not scaled.

See Also

snqProfitEst.

Examples

Run this code
# NOT RUN {
if( requireNamespace( 'micEcon', quietly = TRUE ) ) {
   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" )
   snqProfitWeights( priceNames, quantNames, germanFarms )
}
# }

Run the code above in your browser using DataLab