MyNixOS website logo
Description

Variance-Guided Time-Series Modeling for Temporal Risk Detection.

Fits balanced-panel autoregressive models with conditional heteroscedasticity for temporal risk detection. The main estimator combines autoregressive exogenous mean modeling with GARCH-X variance modeling, subject-specific baseline terms, shared population coefficients, and L1 penalization for high-dimensional covariates. The package returns conditional mean and variance estimates, coefficient summaries, simulations, and exceedance-based risk scores defined as estimated conditional threshold-exceedance probabilities. The implementation builds on the lasso of Tibshirani (1996) <doi:10.1111/j.2517-6161.1996.tb02080.x>, generalized autoregressive conditional heteroscedasticity of Bollerslev (1986) <doi:10.1016/0304-4076(86)90063-1>, and L1-regularized high-dimensional time-series modeling of Medeiros and Mendes (2016) <doi:10.1016/j.jeconom.2015.10.011>.

varGuidTS

Variance-Guided Time-Series Modeling for Temporal Risk Detection

varGuidTS fits a balanced panel ARX-GARCHX model with subject-specific intercepts, shared population coefficients, and joint $\ell_1$ penalization on the conditional mean and variance covariate vectors. The fitted object also exposes an exceedance-based risk score

$$ \hat\pi_{s,t}(c) = P!\left(Y_{s,t} > c ;\middle|; \mathcal{F}_{t-1}\right), $$

useful as a personalized, scale-normalized temporal risk score from high-frequency multimodal panel data such as wearable-sensor streams.

Installation

# from GitHub
install.packages("remotes")
remotes::install_github("zionwzz/variance-guided-risk-demo")

# or from a local source tree
remotes::install_local("path/to/varGuidTS")

Project URL: https://github.com/zionwzz/variance-guided-risk-demo

Quick start

library(varGuidTS)

set.seed(1)
sim <- simulate_scenario(scen = 2, S = 4, T = 60,
                         d_noise = 4, noise_kind = "ar1", seed = 1)
df  <- sim[, c("s", "t", "y",
               grep("^X|^Noise|^Xbin", names(sim), value = TRUE))]

fit <- lmvt(df, p = 1, q = 0, r = 1, s_ord = 1,
            lambda_beta = 0.05, lambda_gamma = 0.05,
            use_x_in_variance = TRUE, maxit = 8)
print(fit)

pred <- predict(fit, df, threshold = quantile(df$y, 0.9))
head(pred)

# Coefficient summary table
sm <- summary(fit, include_zero = FALSE, sort_by = "abs_estimate")
head(sm$table)

# Subject-specific thresholds for personalized exceedance probabilities
subject_cutoffs <- tapply(df$y, df$s, quantile, probs = 0.75, na.rm = TRUE)
pred_subject <- predict(fit, df, threshold = subject_cutoffs,
                        innov_g = TRUE, innov_t = TRUE, df_t = 8)
head(pred_subject)

The README quick start gives the main workflow; the simulation function can be used to generate built-in scenarios for examples, tests, and method demonstrations.

What the package provides

FunctionPurpose
lmvt()Fit penalized panel ARX–GARCHX
predict.lmvt()Conditional mean, variance, and exceedance probability
summary.lmvt()Model diagnostics and coefficient summary table
simulate_scenario()Generate panels under the four canonical scenarios

Maintainer

Min Lu [email protected].

License

MIT.

Citation

Please cite the package repository or the CRAN package record when using varGuidTS.

Metadata

Version

0.1.13

License

Unknown

Platforms (79)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    wasip1
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasip1
  • wasm64-wasip1
  • x86_64-cygwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows