apollo_deltaMethod {apollo}  R Documentation 
Applies the Delta method to calculate the standard errors of transformations of parameters.
apollo_deltaMethod(model, deltaMethod_settings)
model 
Model object. Estimated model object as returned by function apollo_estimate. 
deltaMethod_settings 
List. Contains settings for this function. User input is required for all settings except those with a default or marked as optional.

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.
sum
: Calculates the s.e. of parName1
+ parName2
diff
: Calculates the s.e. of parName1
 parName2
and parName2
 parName1
prod
: Calculates the s.e. of parName1
*parName2
ratio
: Calculates the s.e. of parName1
/parName2
and parName2
/parName1
exp
: Calculates the s.e. of exp(parName1)
logistic
: If only parName1
is provided, it calculates the s.e. of
exp(parName1)/(1+exp(parName1))
and 1/(1+exp(parName1))
.
If parName1
and parName2
are provided, it calculates
exp(par_i)/(1+exp(parName1)+exp(parName2))
for i=1, 2, and 3 (par_3 = 1).
lognormal
: Calculates the mean and s.d. of a lognormal distribution based on the mean
(parName1
) and s.d. (parName2
) of the underlying normal.
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 tratio resulting from the requested expression or operation. This is also printed to screen.