loexp: Expectile regression for time series curve

Description Usage Arguments Value Author(s) References Examples

Description

Expectile regression for time series curve by decomposing data matrix Y = X B + E, where B is "mostly non-negative".

Usage

1
loexp(y, w=rep(1, length(y)), sigma=40, polyo=2, alpha=0.5, biweight=4.685, tol=1e-04, maxIter=50)

Arguments

y

A numeric time series vector of length T.

w

A numeric vector of T case weights. If unspecificed, all weights are set to 1.

sigma

The standard deviation of Gaussian kernel.

polyo

The order of polynomial, currently can be 0, 1, or 2.

alpha

The desired expectile.

biweight

Parameter used in Tukey's biweight function.

tol

The tolerance for expectile estimation.

maxIter

The maximum number of iterations in estimation step.

Value

A list with components:

intparams

An integer vector parameters: return status (0=,1=,2=,3=), length of input vector, polyo and maxit.

dblparams

A double vector of parameters: sigma, alpha, biweight and tolerance.

y

The input vector of data.

w

The input vector of case weights.

outy

The output vector of expectiles for the input data y.

outw

The output vector of weights used in fitting.

Author(s)

Asa Wirapati, Mark Robinson

References

[1] ...

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(loexp.example)

plot(ex1, pch=19, type="b")

# 50th expectile (median)
lines(loexp(ex1, alpha=0.5)$outy, lwd=4, col="blue")

# 0.5th expectile (baseline)
lines(loexp(ex1, alpha=0.005)$outy, lwd=4, col="red")

plot(ex2.y, pch=19, type="b")
# give weight=0 for 0s
lines(loexp(ex2.y, w=ex2.w, alpha=0.005)$outy, lwd=4, col="blue")

expectile documentation built on May 2, 2019, 6:11 p.m.

Related to loexp in expectile...