\name{varGuid}
\alias{varGuid}
\title{Variance-Guided Regression for Heteroscedastic Linear Models}
\description{
The \pkg{varGuid} package implements the global linear mean-variance model from
Section 2 of Liu and Lu (2026) using iteratively reweighted least squares and
iteratively reweighted lasso estimation. This CRAN release focuses on the
heteroscedastic linear model and its prediction utilities for the fitted
stage-1 models. For the grouping-based nonlinear prediction extension from
Section 3 of the paper, please use the development version available at
\code{devtools::install_github("luminwin/varGuid")}.
}
\author{
Sibei Liu and Min Lu
}
\references{
Liu, S. and Lu, M. (2026). \emph{Variance-Guided Regression for Heteroscedastic
Data}. TechRxiv. \doi{10.36227/techrxiv.177004877.75352102/v1}
}
\examples{
\donttest{
data(cobra2d, package = "varGuid")
dat <- cobra2d
set.seed(1)
tid <- sample(seq_len(nrow(dat)), 200)
train <- dat[-tid, ]
yid <- which(colnames(dat) == "y")

o <- lmv(X = train[, -yid], Y = train[, yid], lasso = FALSE)
summary(o$obj.varGuid)
summary(o$obj.OLS)
head(prd(o, train[, -yid], model = "baseline"))
head(prd(o, train[, -yid], model = "varGuid"))

# Iteratively reweighted lasso:
o2 <- lmv(X = train[, -yid], Y = train[, yid], lasso = TRUE)
o2$beta
o2$obj.lasso$beta
head(prd(o2, train[, -yid], model = "baseline"))
head(prd(o2, train[, -yid], model = "varGuid"))
}
}
