apollo_deltaMethod {apollo}R Documentation

Delta method for Apollo models


Applies the Delta method to calculate the standard errors of transformations of parameters.


apollo_deltaMethod(model, deltaMethod_settings)



Model object. Estimated model object as returned by function apollo_estimate.


List. Contains settings for this function. User input is required for all settings except those with a default or marked as optional.

  • expression: Character vector. A character vector with a single or multiple arbitrary functions of the estimated parameters, as text. For example: c(VTT="b1/b2*60"). Each expression can only contain model parameters (estimated or fixed), numeric values, and operands. At least one of the parameters used needs to not have been fixed in estimation. Variables in the database cannot be included. If the user does not provide a name for an expression, then the expression itself is used in the output. If this setting is provided, then operation, parName1, parName2, multPar1 and multPar2 are ignored.

  • varcov: Character. Type of variance-covariance matrix to use in calculations. It can take values "classical", "robust" and "bootstrap". Default is "robust".

  • operation: Character. Function to calculate the delta method for. See details. Not used if expression is provided.

  • parName1: Character. Name of the first parameter if operation is used. See details. Not used if expression is provided.

  • parName2: Character. Name of the second parameter if operation is used. See details. Not used if expression is provided.. Optional depending on operation.

  • printPVal: Logical or Scalar. TRUE or 1 for printing p-values for one-sided test, 2 for printing p-values for two-sided test, FALSE for not printing p-values. FALSE by default.

  • multPar1: Numeric scalar. An optional value to scale parName1. Not used if expression is provided.

  • multPar2: Numeric scalar. An optional value to scale parName2. Not used if expression is provided.


apollo_deltaMethod can be used in two ways. The first and recommended way is to provide an element called expression inside its argument deltaMethod_settings. expression should contain the expression or expressions for which the standard error is/are to be calculated, as text. For example, to calculate the ratio between parameters b1 and b2, expression=c(vtt="b1/b2") should be used.

The second method is to provide the name of a specific operation inside deltaMethod_settings. The following five operations are supported.

By default, apollo_deltaMethod uses the robust covariance matrix. However, the user can change this through the varcov setting.


Matrix containing value, s.e. and t-ratio resulting from the requested expression or operation. This is also printed to screen.

[Package apollo version 0.2.8 Index]