formulaDeriv: Derivative of Right Hand Side of Formula

Description Usage Arguments Value Author(s) See Also

Description

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

Usage

1
formulaDeriv(inFormula, derivVar, data, nDerivs = 1)

Arguments

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 formula and derivVar arguments.

nDerivs

an integer: the number of derivatives to be taken.

Value

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

Author(s)

Michael Lipsitz, Alexandre Belloni, Victor Chernozhukov, Ivan Fernandez-Val

See Also

npqr


quantreg.nonpar documentation built on May 2, 2019, 5:40 a.m.