What is this talk about? Applied Asymptotics in R an R package - - PowerPoint PPT Presentation

what is this talk about applied asymptotics in r
SMART_READER_LITE
LIVE PREVIEW

What is this talk about? Applied Asymptotics in R an R package - - PowerPoint PPT Presentation

What is this talk about? Applied Asymptotics in R an R package bundle Examples of the use of higher order likelihood inference hoa Higher Order (small sample) Asymptotics Alessandra R. Brazzale Institute of Biomedical Engineering n


slide-1
SLIDE 1

Applied Asymptotics in R

Examples of the use of higher order likelihood inference Alessandra R. Brazzale

Institute of Biomedical Engineering Italian National Research Council, Padova alessandra.brazzale@isib.cnr.it

The R User Conference 2006 Vienna, 15–17 June 2006

Alessandra R. Brazzale Applied Asymptotics in R

What is this talk about?

an R package bundle

hoa

Higher Order (small sample) Asymptotics

n − → ∞

for likelihood-based parametric inference . . . and where to read more about the subject

Alessandra R. Brazzale Applied Asymptotics in R A toy example Asymptotics Examples Cauchy data Op(n−1/2) Op(n−3/2)

A toy example

i.i.d. sample y1, . . . , yn from the Cauchy distribution f(yi; θ) = 1 π{1 + (yi − θ)2} log likelihood function: ℓ(θ; y) = − n

i=1 log{1 + (yi − θ)2}

maximum likelihood estimator: ˆ θ = argmaxθ ℓ(θ; y)

n = 1

ˆ θ = y F(ˆ θ; θ) = F(y; θ) = π−1 arctan(y − θ)

Alessandra R. Brazzale Applied Asymptotics in R A toy example Asymptotics Examples Cauchy data Op(n−1/2) Op(n−3/2)

Likelihood inference

confidence intervals and p-values are computed using p(θ; ˆ θ) = Pr(ˆ Θ ≤ ˆ θ; θ) exact: p(θ; ˆ θ) = Pr(Y ≤ y; θ) approximate: p(θ; ˆ θ) = Φ(pivot) + Op

  • n−1/2

Wald pivot: w(θ) = √ 2(y − θ) likelihood root: r(θ) = sign(ˆ θ − θ)

  • 2 log{1 + (y − θ)2}

1/2 score pivot: s(θ) = √ 2(y − θ)/{1 + (y − θ)2}

Alessandra R. Brazzale Applied Asymptotics in R

slide-2
SLIDE 2

A toy example Asymptotics Examples Cauchy data Op(n−1/2) Op(n−3/2)

Can we do better?

p(θ; ˆ θ) = Φ(pivot) + Op

  • n−3/2

modified likelihood root

r ∗(θ) = r(θ) + 1 r(θ) log s(θ) r(θ)

Alessandra R. Brazzale Applied Asymptotics in R A toy example Asymptotics Examples Cauchy data Op(n−1/2) Op(n−3/2)

y = 1.32 (n = 1)

4 2 2 4 0.0 0.2 0.4 0.6 0.8 1.0

  • significance function

Alessandra R. Brazzale Applied Asymptotics in R A toy example Asymptotics Examples Cauchy data Op(n−1/2) Op(n−3/2)

And what if n > 1?

There is no exact solution, but . . .

marg[hoa] package

> library( marg ) > set.seed( 321 ) > y <- rt( n = 15, df = 3 ) > y.rsm <- rsm( y ~ 1, family = student(3) ) > y.cond <- cond( y.rsm, offset = 1 ) > summary( y.cond, test = 0 ) p-values: 0.282 (Wald), 0.306 (r), 0.354 (r ∗)

Alessandra R. Brazzale Applied Asymptotics in R A toy example Asymptotics Examples First order Higher order in R

General theory

θ = (ψ, λ), with scalar parameter of interest ψ significance function p(ψ; ˆ ψ) = Pr(ˆ Ψ ≤ ˆ ψ; ψ) profile log likelihood: ℓp(ψ) = ℓ(ψ, ˆ λψ; y)

Wald statistic: w(θ) = jp( ˆ ψ)1/2( ˆ ψ − ψ) likelihood root: r(θ) = sign( ˆ ψ − ψ)

  • 2{ℓp( ˆ

ψ) − ℓp(ψ)} 1/2 score statistic: s(θ) = jp( ˆ ψ)−1/2dℓp(ψ)/dψ

with jp(ψ) = −d2ℓp(ψ)/dψ2

Alessandra R. Brazzale Applied Asymptotics in R

slide-3
SLIDE 3

A toy example Asymptotics Examples First order Higher order in R

Higher order inference

Modified likelihood root

r ∗(ψ) = r(ψ) + 1 r(ψ) log q(ψ) r(ψ) with q(ψ) representing a suitable correction term p(ψ; ˆ ψ) = Φ{r ∗(ψ)} + Op(n−3/2) r ∗(ψ) = r(ψ) + rinf(ψ) + rnp(ψ)

rinf(ψ): information adjustment rnp(ψ): nuisance parameter adjustment

Alessandra R. Brazzale Applied Asymptotics in R A toy example Asymptotics Examples First order Higher order in R

The hoa bundle

cond:

logistic regression Pr(Yi = 1; β) = exp(x⊤

i β)

1 + exp(x⊤

i β)

marg:

linear nonnormal models yi = x⊤

i β + σεi,

εi ∼ f0(·)

nlreg:

nonlinear heteroscedastic regression yij = µ(xi; β) + ω(xi; β, ρ)εij, εij ∼ N(0, 1)

csampling:

conditional sampling routines

Alessandra R. Brazzale Applied Asymptotics in R A toy example Asymptotics Examples Logistic regression Nonlinear regression

airway data

> head(airway) response age sex lubricant duration type 1 48 1 45 2 48 1 15 3 1 39 1 40 4 1 59 1 83 1 5 1 24 1 1 90 1 6 1 55 1 1 25 1

Collet (1998)

Alessandra R. Brazzale Applied Asymptotics in R A toy example Asymptotics Examples Logistic regression Nonlinear regression

airway data (2/3)

> airway.glm <- glm( formula(airway), family = binomial, + data = airway ) > library( cond ) > airway.cond <- cond( airway.glm, offset = type1 ) > summary( airway.cond )

Alessandra R. Brazzale Applied Asymptotics in R

slide-4
SLIDE 4

A toy example Asymptotics Examples Logistic regression Nonlinear regression

airway data (3/3)

Confidence intervals

  • level = 95 %

lower two-sided upper Wald pivot

  • 3.486

0.2271 Wald pivot (cond. MLE)

  • 3.053

0.2655 Likelihood root

  • 3.682

0.1542 Modified lik. root

  • 3.130

0.2558 Modified lik. (cont. corr.)

  • 3.592

0.5649 Diagnostics:

  • INF

NP 0.05855 0.51426

Alessandra R. Brazzale Applied Asymptotics in R A toy example Asymptotics Examples Logistic regression Nonlinear regression

calcium uptake data

> library( boot) > head( calcium ) time cal 1 0.45 0.34170 2 0.45 -0.00438 3 0.45 0.82531 4 1.30 1.77967 5 1.30 0.95384 6 1.30 0.64080

Davison & Hinkley (1997, Example 7.7)

Alessandra R. Brazzale Applied Asymptotics in R A toy example Asymptotics Examples Logistic regression Nonlinear regression

calcium uptake data (2/3)

µ(xi; β) = β0{1 − exp(−β1xi)}, ω2(xi; γ) = σ2 1 + xγ

i

  • > library( nlreg )

> calcium.nl <- + nlreg( cal ~ b0 * (1 - exp(-b1 * time)), + weights = ~ 1 + time^g, data = calcium, + start = c(b0 = 4, b1 = 0.1, g = 0) ) > calcium.prof <- profile( calcium.nl ) > contour( calcium.prof, alpha = 0.05, lwd1 = 2, + lwd2 = 2 )

Alessandra R. Brazzale Applied Asymptotics in R A toy example Asymptotics Examples Logistic regression Nonlinear regression

3.5 4.5 5.5 3 2 1 1 2 3

b0

3 2 3 2 1 1 2 3 3.5 4.5 5.5 0.10 0.15 0.20 0.25 0.30 0.35 3 2 3 2 1 1 2 3 3.5 4.5 5.5 1.0 0.5 0.0 0.5 1.0 1.5 3 2 4 3 2 1 1 2 3 3.5 4.5 5.5 4.0 3.5 3.0 2.5 2.0 1.5 1.0 0.5 0.15 0.30 3 2 1 1 2 3

b1

3 2 3 2 1 1 2 3 0.10 0.25 1.0 0.5 0.0 0.5 1.0 1.5 3 2 4 3 2 1 1 2 3 0.10 0.25 4.0 3.5 3.0 2.5 2.0 1.5 1.0 0.5 1.0 0.5 3 2 1 1 2 3

g

3 2 4 3 2 1 1 2 3

  • 1.5

0.0 1.5 4.0 3.5 3.0 2.5 2.0 1.5 1.0 0.5

  • 3.5

1.5 3 2 1 1 2 3

logs Alessandra R. Brazzale Applied Asymptotics in R

slide-5
SLIDE 5

To wind up Applied Asymptotics Credits

And if you wish to try more . . .

Brazzale, A. R. (2005). hoa: An R package bundle for higher order likelihood inference. Rnews, Vol. 5/1, May 2005, pp. 20–27. R vignette in hoa v. 1.1-0 Brazzale, A. R., Davison, A. C. and Reid, N. (2006). Applied Asymptotics. Cambridge University Press. (Forthcoming) www.isib.cnr.it/∼brazzale/CS theory & implementation & examples and case studies

Alessandra R. Brazzale Applied Asymptotics in R To wind up Applied Asymptotics Credits

Credits

Alessandra Salvan, Anthony C. Davison, Nancy Reid Ruggero Bellio Douglas M. Bates, Kurt Hornik, Torsten Hothorn . . . and the useRs!

Alessandra R. Brazzale Applied Asymptotics in R