iptReg {ImpShrinkage} | R Documentation |
The improved preliminary test estimator
Description
This function calculates the improved preliminary test estimator. When the error has a normal distribution, this estimator can be calculated by
\hat{\beta}^{iPT}= \hat{\beta}^{PT} - d (\hat{\beta}^{U} - \hat{\beta}^{R}) \mathcal{L}^{-1} I(\mathcal{L} > F_{q,n-p}(\alpha))
and, when the error has a non-normal distribution, by
\hat{\beta}^{iPT}= \hat{\beta}^{PT} - d (\hat{\beta}^{U} - \hat{\beta}^{R}) \mathcal{L}^{-1} I(\mathcal{L} > \chi^2_{q}(\alpha))
where I(A)
denotes an indicator function and
-
\hat{\beta}^{PT}
is the preliminary test estimator; SeeptReg
-
\hat{\beta}^{U}
is the unrestricted estimator; SeeunrReg
. -
\hat{\beta}^{R}
is the restricted estimator; SeeresReg
. -
\mathcal{L}
is the test statistic. Seeteststat
; -
F_{q,n-p}(\alpha)
is the upper\alpha
level critical value ofF
-distribution with(q,n-p)
degrees of freedom, calculated usingqf
; -
\chi^2_{q}(\alpha)
is the upper\alpha
level critical value of\chi^2
-distribution withq
degree of freedom, calculated usingqchisq
; -
d
is the shrinkage factor; -
\alpha
is the significance level.
Usage
iptReg(X, y, H, h, alpha, d = NULL, is_error_normal = FALSE)
Arguments
X |
Matrix with input observations, of dimension |
y |
Vector with response observations of size |
H |
A given |
h |
A given |
alpha |
A given significance level. |
d |
(optional) If not provided (or set to |
is_error_normal |
logical value indicating whether the errors follow a
normal distribution. If |
Details
The corresponding estimator of \sigma^2
is
s^2 = \frac{1}{n-p}(y-X\hat{\beta}^{iPT})^{\top}(y - X\hat{\beta}^{iPT}).
Value
An object of class improvedpreliminaryTest
is a list containing at least the following components:
coef
A named vector of coefficients.
residuals
The residuals, that is, the response values minus fitted values.
s2
The estimated variance.
fitted.values
The fitted values.
References
Saleh, A. K. Md. Ehsanes. (2006). Theory of Preliminary Test and Stein‐Type Estimation With Applications, Wiley.
Kaciranlar, S., Akdeniz, S. S. F., Styan, G. P. & Werner, H. J. (1999). A new biased estimators in linear regression and detailed analysis of the widely-analysed dataset on portland cement. Sankhya, Series B, 61(3), 443-459.
Kibria, B. M. Golam (2005). Applications of Some Improved Estimators in Linear Regression, Journal of Modern Applied Statistical Methods, 5(2), 367- 380.
Examples
n_obs <- 100
p_vars <- 5
beta <- c(2, 1, 3, 0, 5)
simulated_data <- simdata(n = n_obs, p = p_vars, beta)
X <- simulated_data$X
y <- simulated_data$y
p <- ncol(X)
# H beta = h
H <- matrix(c(1, 1, -1, 0, 0, 1, 0, 1, 0, -1, 0, 0, 0, 1, 0), nrow = 3, ncol = p, byrow = TRUE)
h <- rep(0, nrow(H))
iptReg(X, y, H, h, alpha = 0.05)
# H beta != h
p <- ncol(X)
H <- matrix(c(1, 1, -1, 0, 0, 1, 0, 1, 0, -1, 0, 0, 0, 1, 0), nrow = 3, ncol = p, byrow = TRUE)
h <- rep(1, nrow(H))
iptReg(X, y, H, h, alpha = 0.05)
data(cement)
X <- as.matrix(cbind(1, cement[, 1:4]))
y <- cement$y
# Based on Kaciranlar et al. (1999)
H <- matrix(c(0, 1, -1, 1, 0), nrow = 1, ncol = 5, byrow = TRUE)
h <- rep(0, nrow(H))
iptReg(X, y, H, h, alpha = 0.05)
# Based on Kibria (2005)
H <- matrix(c(0, 1, -1, 1, 0, 0, 0, 1, -1, -1, 0, 1, -1, 0, -1), nrow = 3, ncol = 5, byrow = TRUE)
h <- rep(0, nrow(H))
iptReg(X, y, H, h, alpha = 0.05)