Assuming equal variances, can estimate using regression. E.g. for - - PowerPoint PPT Presentation

assuming equal variances can estimate using regression e
SMART_READER_LITE
LIVE PREVIEW

Assuming equal variances, can estimate using regression. E.g. for - - PowerPoint PPT Presentation

Threshold Models A simple form of nonlinear model, basically a switching AR( p ): x t = ( j ) + ( j ) 1 x t 1 + + ( j ) p x t p + ( j ) w t if x t 1 R j , where x t 1 = ( x t 1 , . . . , x t


slide-1
SLIDE 1

Threshold Models

  • A simple form of nonlinear model, basically a “switching”

AR(p): xt = α(j) + φ(j)

1 xt−1 + · · · + φ(j) p xt−p + σ(j)wt

if xt−1 ∈ Rj, where xt−1 = (xt−1, . . . , xt−p)′, R1, R2, . . . , Rr is a partition of Rp, and wt is white noise with variance 1.

  • That is, the AR(p) parameters in the equation for xt change,

depending on the values of the previous p observations xt−1, . . . , xt−p.

1

slide-2
SLIDE 2
  • Assuming equal variances, can estimate using regression.

E.g. for monthly pneumonia and influenza deaths:

flu = ts(scan("flu.dat")); dflu = diff(flu); a = dflu; for (l in 1:6) a = cbind(a, lag(dflu, -l)); a = cbind(a, lag(dflu, -1) > 0.05); a = data.frame(a); names(a) = c("x", paste("x", 1:6, sep = ""), "delta"); summary(lm(x ~ delta + x1*delta + x2*delta + x3*delta + x4*delta + x5*delta + x6*delta, data = a)); flu.l = lm(x ~ -1 + delta + x1*delta + x2*delta + x3*delta + x4*delta, data = a); summary(flu.l); flu.r = residuals(flu.l); delta = a$delta[4 + 1:length(flu.r)]; lapply(split(flu.r, delta), sd); acf(flu.r);

2

slide-3
SLIDE 3
  • This is inefficient, and standard errors are invalid, if variances

are unequal; here F = 1.93, df = (17, 110), P = .022.

  • We can also fit the model using two separate regressions:

flu.lF = lm(x ~ x1 + x2 + x3 + x4, data = a, subset = (delta == 0)); summary(flu.lF); flu.lT = lm(x ~ x1 + x2 + x3 + x4, data = a, subset = (delta == 1)); summary(flu.lT);

  • Setting up a residual series:

flu.r01 = flu.r; flu.r01[!delta] = residuals(flu.lF) / sd(residuals(flu.lF)); flu.r01[delta] = residuals(flu.lT) / sd(residuals(flu.lT)); acf(flu.r01);

3

slide-4
SLIDE 4

Regression with Autocorrelated Errors

  • Regression model

yt = β′zt + xt where xt has covariance matrix Γ.

  • Generalized least squares (GLS) estimates for known Γ:

ˆ

β =

  • Z′Γ−1Z

−1 Z′Γ−1y.

  • For unknown Γ, plug in an estimate.

4

slide-5
SLIDE 5
  • If xt is a stationary time series, can fit using OLS, then either:

– get estimated autocovariances ˆ γ(h) from the residuals, and plug in ˆ

Γ;

– or use Cochrane-Orcutt method.

  • More generally, can use mixed model methods (SAS proc

mixed).

5

slide-6
SLIDE 6
  • Cochrane and Orcutt suggested:

– fit using OLS to get initial estimate of β; – fit AR(p) to OLS residuals (wt is white noise): φ(B)xt = wt; – transform the regression to φ(B)yt = β′φ(B)zt + φ(B)xt = β′φ(B)zt + wt

  • r

ut = β′vt + wt.

  • Residuals are now white, so fit using OLS.

6

slide-7
SLIDE 7
  • SAS proc arima offers better solution:

– Mortality and air pollution (Example 5.6): program and

  • utput.

– Global temperature and cumulative CO2 emissions: pro- gram and output.

  • In R, temperature (slightly different) and CO2:

arima(globtemp, order = c(1, 0, 0), xreg = co2w); arima(globtemp, order = c(4, 0, 0), xreg = co2w); arima(globtemp, order = c(0, 0, 4), xreg = co2w);

7