Learn R Programming

algebraic.dist (version 0.9.1)

delta_clt: Delta Method CLT Limiting Distribution

Description

Returns the limiting distribution of \(\sqrt{n}(g(\bar{X}_n) - g(\mu))\) under the Delta Method. For a univariate distribution, this is \(N(0, g'(\mu)^2 \sigma^2)\). For a multivariate distribution with Jacobian \(J = Dg(\mu)\), this is \(MVN(0, J \Sigma J^T)\).

Usage

delta_clt(base_dist, g, dg)

Value

A normal or mvn distribution representing the Delta Method limiting distribution.

Arguments

base_dist

A dist object representing the base distribution.

g

The function to apply to the sample mean.

dg

The derivative (univariate) or Jacobian function (multivariate) of g. For univariate distributions, dg(x) should return a scalar. For multivariate distributions, dg(x) should return a matrix (the Jacobian).

Examples

Run this code
# Delta method: g = exp, dg = exp
x <- exponential(rate = 1)
z <- delta_clt(x, g = exp, dg = exp)
mean(z)
vcov(z)

Run the code above in your browser using DataLab