Description Usage Arguments Value Author(s) See Also Examples
View source: R/translogMonoRestr.R
Create matrix to check or impose the monotonicity restrictions of a translog function.
1 2 | translogMonoRestr( xNames, data,
dataLogged = FALSE, box = FALSE )
|
xNames |
a vector of strings containing the names of the independent variables. |
data |
dataframe containing the data. |
dataLogged |
logical. Are the values in |
box |
logical. Should monotonicity be imposed within
an n-dimensional box that includes all points in |
translogMonoRestr
returns a matrix of dimension
( n \cdot N ) \times c,
where n is the number of independent varables,
N is the number of data points at which monotonicity
should be imposed (if argument box
is FALSE
,
N is the number of rows in data
;
if argument box
is TRUE
, N = 2^n),
and c = 1 + n ( n + 3 ) / 2 is the number of (linearly independent)
coefficients.
Multiplying a row of this matrix (e.g.\ the kth row of M)
by the vector of coefficients (β)
results in the derivative of the dependent variable (y)
with respect to one independent variable (e.g.\ x_i)
at one data point (e.g.\ j):
M[k,] * β = ( d log y )/( d log x_i )
, evaluated at x_{1j}, ..., x_{nj}, where k = ( i - 1 ) N + j. Hence, the observations run faster than the independent variables.
Arne Henningsen
translogEst
, translogDeriv
,
and translogCheckMono
1 2 3 4 5 6 7 8 9 10 11 12 | data( germanFarms )
# quantity of variable inputs
germanFarms$qVarInput <- germanFarms$vVarInput / germanFarms$pVarInput
# matrix to check or impose monotonicity at all observations
monoRestrObs <- translogMonoRestr( c( "qLabor", "land", "qVarInput" ),
germanFarms )
# matrix to check or impose monotonicity within a box that includes all
# observations
monoRestrBox <- translogMonoRestr( c( "qLabor", "land", "qVarInput" ),
germanFarms, box = TRUE )
|
If you have questions, suggestions, or comments regarding one of the 'micEcon' packages, please use a forum or 'tracker' at micEcon's R-Forge site:
https://r-forge.r-project.org/projects/micecon/
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.