deltaMethod: Variance Matrix of a Nonlinear Estimator Using the Delta...

Description Usage Arguments Value See Also Examples

View source: R/deltaMethod.R

Description

Computes the variance of a nonlinear parameter using the delta method.

Usage

1
deltaMethod(derived.pars, est, Sigma, h=1e-05)

Arguments

derived.pars

Vector of derived parameters written in R formula framework (see Examples).

est

Vector of parameter estimates

Sigma

Covariance matrix of parameters

h

Numerical differentiation parameter

Value

coef

Vector of nonlinear parameters

vcov

Covariance matrix of nonlinear parameters

se

Vector of standard errors

A

First derivative of nonlinear transformation

univarTest

Data frame containing univariate summary of nonlinear parameters

WaldTest

Multivariate parameter test for nonlinear parameter

See Also

See car::deltaMethod or msm::deltamethod.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#############################################################################
# EXAMPLE 1: Nonlinear parameter
#############################################################################

#-- parameter estimate
est <- c( 510.67, 102.57)
names(est) <- c("mu", "sigma")
#-- covariance matrix
Sigma <- matrix( c(5.83, 0.45, 0.45, 3.21 ), nrow=2, ncol=2 )
colnames(Sigma) <- rownames(Sigma) <- names(est)
#-- define derived nonlinear parameters
derived.pars <- list( "d"=~ I( ( mu - 508 ) / sigma ),
                      "dsig"=~ I( sigma / 100 - 1) )

#*** apply delta method
res <- CDM::deltaMethod( derived.pars, est, Sigma )
res

CDM documentation built on Nov. 6, 2018, 5:07 p.m.