Description Usage Arguments Value Author(s) See Also
Takes the symbolic derivative (or multiple derivatives) of the right hand side of a formula and returns a matrix with the derivative evaluated at each observation in a dataset
1 | formulaDeriv(inFormula, derivVar, data, nDerivs = 1)
|
inFormula |
a formula object, with the response Y on the left of a ~ operator, and the covariate terms, separated by + operators on the right, not including the regressor whose effect is to be estimated nonparametrically. Operators such as '*', ':', 'log()', and 'I()' are allowable. However, factor variables should be constructed prior to entry in the formula: the 'factor()' operator is not allowable. |
derivVar |
a character object giving the name of the variable with respect to which the derivative will be taken. |
data |
a data.frame in which to interpret the variables named in the |
nDerivs |
an integer: the number of derivatives to be taken. |
formulaDeriv returns a matrix whose dimensions are the number of observations in data and the number of variables on the right hand side of formula. Each row is the derivative of formula evaluated at the corresponding observation in data
Michael Lipsitz, Alexandre Belloni, Victor Chernozhukov, Ivan Fernandez-Val
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.