R: True MSE Risk of Shrinkage Resulting from Known Regression...
RXtrisk
R Documentation
True MSE Risk of Shrinkage Resulting from Known Regression Parameters
Description
By specifying numerical values for regression parameters (uncorrelated components and error
sigma) that usually are unknown, these functions can calculate and display True MSE Risk
statistics associated with shrinkage along a given Q-shaped path.
A regression formula [y~x1+x2+...] suitable for use with lm().
data
Data frame containing observations on all variables in the formula.
trug
Column vector of numerical values for the true uncorrelated components
of the regression coefficient vector.
trus
Numerical value for the true error standard deviation, Sigma.
Q
Numerical value for the shape parameter controlling shrinkage path curvature.
Default shape is Q = 0 for Hoerl-Kennard "ordinary" ridge regression.
rscale
One of three possible choices (0, 1 or 2) for rescaling of variables
as they are being "centered" to remove non-essential ill-conditioning: 0 implies no
rescaling; 1 implies divide each variable by its standard error; 2 implies rescale as
in option 1 but re-express answers as in option 0.
steps
Number of equally spaced values per unit change along the horizontal
M-extent-of-shrinkage axis where estimates are calculated and displayed in TRACES
(default = 8.)
qmax
Maximum allowed Q-shape (default = +5.)
qmin
Minimum allowed Q-shape (default = -5.)
Details
The RXridge() functions calculate maximum likelihood estimates (corrected, if
necessary, so as to have correct range) for typical statistical inference situations where
regression parameters are unknowns. In sharp contrast with this usual situation, the
RXtrisk() functions show exactly how expected regression coefficients and true Mean
Squared Error Risk actually do change with shrinkage when regression parameters take on
specified, KNOWN numerical values.
Value
An output list object of class RXtrisk:
form
The regression formula specified as the first argument.
data
Name of the data.frame object specified as the second argument.
trug
Vector of numerical values for the true uncorrelated gamma components.
trus
Numerical value for the true error standard deviation, Sigma.
qp
Numerical value of the Q-shape actually used for shrinkage.
p
Number of regression predictor variables.
n
Number of complete observations after removal of all missing values.
prinstat
Listing of principal statistics.
coef
Matrix of expected shrinkage-ridge regression coefficients.
rmse
Matrix of true MSE risk values for shrunken coefficients.
exev
Matrix of true excess eigenvalues (ordinary least squares minus ridge.)
infd
Matrix of direction cosines for the true inferior direction, if any.
spat
Matrix of shrinkage pattern delta factors.
sext
Listing of summary statistics for all M-extents-of-shrinkage.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(RXshrink)
Loading required package: lars
Loaded lars 1.2
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/RXshrink/RXtrisk.Rd_%03d_medium.png", width=480, height=480)
> ### Name: RXtrisk
> ### Title: True MSE Risk of Shrinkage Resulting from Known Regression
> ### Parameters
> ### Aliases: RXtrisk
> ### Keywords: regression hplot
>
> ### ** Examples
>
> data(mpg)
> form <- mpg~cylnds+cubins+hpower+weight
> rxrobj <- RXridge(form, data=mpg)
> # define true parameter values.
> trugam <- matrix(c(-.5,-.1,.1,-.6),4,1)
> trusig <- 0.4
> # create true shrinkage MSE risk scenario.
> trumse <- RXtrisk(form, data=mpg, trugam, trusig, Q=-1, steps=4)
> plot(trumse)
>
>
>
>
>
> dev.off()
null device
1
>