Title: | Random Coefficient Minification Time Series Models |
---|---|
Description: | Data sets, and functions for simulating and fitting nonlinear time series with minification and nonparametric models. |
Authors: | L. Han [aut, cre] |
Maintainer: | L. Han <[email protected]> |
License: | Unlimited |
Version: | 1.2 |
Built: | 2025-02-24 02:45:54 UTC |
Source: | https://github.com/cran/RCMinification |
This function uses local polynomial regression to nonparametrically estimate the autoregression function in a nonlinear AR1 model.
ARlocpoly(z, deg = 1, h, ...)
ARlocpoly(z, deg = 1, h, ...)
z |
numeric vector of time series observations. |
deg |
numeric, degree of local polynomial fit. |
h |
numeric, bandwidth for local polynomial estimate. |
... |
any other arguments taken by |
A list containing
x |
numeric vector of evaluation points. |
y |
numeric vector of nonparametric estimates at the values in |
h |
numeric, bandwidth |
L. Han and S. Snyman
Fan, J. and Yao, Q. (2008) Nonlinear Time Series: Nonparametric and Parametric Methods. Springer.
x <- nonlinearAR1.sim(100, g = function(x) x*sin(x), sd = 1.5) # simulated data ARlocpoly(x, deg = 0, h = 0.5)
x <- nonlinearAR1.sim(100, g = function(x) x*sin(x), sd = 1.5) # simulated data ARlocpoly(x, deg = 0, h = 0.5)
The BCfireArea
time series object consists of 13 observations on annual area burnt in the province of BC.
data(BCfireArea)
data(BCfireArea)
A time series object
ts.plot(BCfireArea)
ts.plot(BCfireArea)
Weekly volumes (in litres) of produced at a large brewery for 137 weeks.
data(FWI)
data(FWI)
A time series object
acf(BeerVolume)
acf(BeerVolume)
This function uses local polynomial regression to nonparametrically estimate the autoregression function in a nonlinear AR1 model using Cheng's bias reduction method.
ChengTS(z, degree = 1, hopt, ...)
ChengTS(z, degree = 1, hopt, ...)
z |
numeric vector of time series observations. |
degree |
numeric, degree of local polynomial fit. |
hopt |
numeric, base bandwidth for local polynomial estimate. |
... |
any other arguments taken by |
A list containing
x |
numeric vector of evaluation points. |
y |
numeric vector of nonparametric estimates at the values in |
L. Han and S. Snyman
Cheng, M., Huang, R., Liu, P. and Liu, H. (2018) Bias reduction for nonparametric and semiparametric regression models. Statistica Sinica 28(4):2749-2770.
x <- nonlinearAR1.sim(100, g = function(x) x*sin(x), sd = 1.5) # simulated data ChengTS(x, degree = 1, hopt = 0.5) x <- nonlinearAR1.sim(100, g = function(x) x*sin(x), sd = 0.5) # simulated data degree <- 1; xrange <- c(-.5, .5); n <- length(x) h <- thumbBw(x[-n], x[-1], deg = degree, kernel=gaussK) x.lp <- ARlocpoly(x, deg = degree, h = h, range.x = xrange) x.shp <- sharpARlocpoly(x, deg = degree, range.x = xrange, h = x.lp$h*n^(4/45)) x.cheng <- ChengTS(x, degree = degree, hopt = h, range.x = xrange) lag.plot(x, do.lines=FALSE) lines(x.lp) lines(x.shp, col=2) lines(x.cheng, col=4)
x <- nonlinearAR1.sim(100, g = function(x) x*sin(x), sd = 1.5) # simulated data ChengTS(x, degree = 1, hopt = 0.5) x <- nonlinearAR1.sim(100, g = function(x) x*sin(x), sd = 0.5) # simulated data degree <- 1; xrange <- c(-.5, .5); n <- length(x) h <- thumbBw(x[-n], x[-1], deg = degree, kernel=gaussK) x.lp <- ARlocpoly(x, deg = degree, h = h, range.x = xrange) x.shp <- sharpARlocpoly(x, deg = degree, range.x = xrange, h = x.lp$h*n^(4/45)) x.cheng <- ChengTS(x, degree = degree, hopt = h, range.x = xrange) lag.plot(x, do.lines=FALSE) lines(x.lp) lines(x.shp, col=2) lines(x.cheng, col=4)
The FWI
list consists of 4 vectors containing daily
Fire Weather Index observations.
data(FWI)
data(FWI)
This list contains the following vectors:
FWI observations from Prince George, BC for 2008
FWI observations from Prince George, BC for 2009
FWI observations from Edmonton, AB for 2013
FWI observations from Edmonton, AB for 2014
RCMTmle(FWI$PG2009[c(100:300)])
RCMTmle(FWI$PG2009[c(100:300)])
Global average temperatures are recorded in terms of number of Celsius degrees above a baseline temperature from 1880 to 2016. The baseline temperature is the average temperature for the year 1990.
data(Globaltemps)
data(Globaltemps)
A numeric vector
temps <- ts(Globaltemps, start = 1880, end = 2016) ts.plot(temps, ylab = "Change in Temperature")
temps <- ts(Globaltemps, start = 1880, end = 2016) ts.plot(temps, ylab = "Change in Temperature")
Longitudinal acceleration measurements of an air tanker fighting a forest wildfire taken at 1 second intervals.
data(longitudinalAcceleration)
data(longitudinalAcceleration)
A time series object
acf(longitudinalAcceleration)
acf(longitudinalAcceleration)
Electroless nickel concentrations in a chrome plating process were measured at the beginning of each eight hour work shift for a period of 25 days. A concentration of 4.5 ounces per gallon is considered optimal in this application.
data(nickel)
data(nickel)
A time series object
Farnum, N. (1994) Statistical Quality Control and Improvement. Belmont, Duxbury Press.
ts.plot(nickel)
ts.plot(nickel)
This function simulates sequences of variates follow a nonlinear autoregressive order 1 process of the form z_n = g(z_n-1) + epsilon. A normal distribution is assumed for the innovations.
nonlinearAR1.sim(n, g, ...)
nonlinearAR1.sim(n, g, ...)
n |
number of observations. |
g |
autoregression function. |
... |
any parameters that are taken by |
L. Han and S. Snyman
x <- nonlinearAR1.sim(50, g = function(x) x*sin(x), sd = 2.5) ts.plot(x)
x <- nonlinearAR1.sim(50, g = function(x) x*sin(x), sd = 2.5) ts.plot(x)
This function estimates parameters for tailed exponential and Weibull random coefficient minification process models from a nonnegative time series.
RCMTmle(y)
RCMTmle(y)
y |
numeric vector of nonnegative observations. |
A list containing
n |
the number of time series observations. |
p |
estimated power for transformation from exponential to Weibull. |
p.eps |
estimated tailed exponential probability parameter when preceding observation is nonzero. |
p.delta |
estimated tailed exponential probability parameter when preceding observation is 0 |
mu |
estimated mu parameter for lognormal distribution used to simulated random coefficients. |
sigma |
estimated sigma parameter for lognormal distribution used to simulate random coefficients. |
lambda |
estimated tailed exponential rate parameter when preceding observation is nonzero. |
gamma |
estimated tailed exponential rate parameter when preceding observation is 0. |
like |
maximum value of likelihood. |
y |
original observations |
L. Han
Han, L., Braun, W.J. and Loeppky (2018) Random Coefficient Minification Processes. Statistical Papers, pp 1-22.
This function simulates sequences of tailed exponential variates which have survivor function P(X > x) = (1-p)exp(-lambda x), for x > 0 and P(X = 0) = p.
rET(n, prob, rate)
rET(n, prob, rate)
n |
number of observations. |
prob |
vector of probabilities. |
rate |
vector of exponential rate parameters. |
L. Han
Littlejohn, R.P. (1994) A Reversibility Relationship for Two Markovian Time Series Models with Stationary Exponential Tailed Distribution. Journal of Applied Probability. 31 pp 575-581.
Standard deviation estimate which is insensitive to outliers and random trends.
robustSD(x)
robustSD(x)
x |
A numeric vector. |
L. Han
Tatum, L.G. (1997) Robust Estimation of the Process Standard Deviation for Control Charts. Journal of the American Statistical Association 39, pp 127-141.
robustSD(EuStockMarkets[,1])
robustSD(EuStockMarkets[,1])
This function simulates sequences of tailed exponential and Weibull random coefficient minification process variates. Random coefficients are lognormal distributed with parameters mu and sigma.
rRCMT(n, p, p.delta, p.eps, lambda, gamma, mu, sigma, RCMTobj)
rRCMT(n, p, p.delta, p.eps, lambda, gamma, mu, sigma, RCMTobj)
n |
number of observations. |
p |
power for transformation from exponential to Weibull. |
p.delta |
tailed exponential probability parameter when preceding observation is 0 |
p.eps |
tailed exponential probability parameter when preceding observation is nonzero. |
lambda |
tailed exponential rate parameter when preceding observation is nonzero. |
gamma |
tailed exponential rate parameter when preceding observation is 0. |
mu |
mu parameter for lognormal distribution used to simulated random coefficients. |
sigma |
sigma parameter for lognormal distribution used to simulate random coefficients. |
RCMTobj |
list containing elements n, p, p.delta, p.eps, lambda and gamma |
L. Han
Han, L., Braun, W.J. and Loeppky (2018) Random Coefficient Minification Processes. Statistical Papers, pp 1-22.
This function uses local polynomial regression to nonparametrically estimate the autoregression function in a nonlinear AR1 model, after employing data sharpening on the responses.
sharpARlocpoly(z, deg = 1, h, ...)
sharpARlocpoly(z, deg = 1, h, ...)
z |
numeric vector of time series observations. |
deg |
numeric, degree of local polynomial fit. |
h |
numeric, bandwidth for local polynomial estimate. |
... |
any other arguments taken by |
A list containing
x |
numeric vector of evaluation points. |
y |
numeric vector of nonparametric estimates at the values in |
L. Han and S. Snyman
Choi, E., Hall, P. and Rousson, V. (2000) Data Sharpening Methods for Bias Reduction in Nonparametric Regression. Annals of Statistics 28(5):1339-1355.
x <- nonlinearAR1.sim(100, g = function(x) x*sin(x), sd = 1.5) # simulated data sharpARlocpoly(x, deg = 0, h = 0.5)
x <- nonlinearAR1.sim(100, g = function(x) x*sin(x), sd = 1.5) # simulated data sharpARlocpoly(x, deg = 0, h = 0.5)