Fits a linear Liu regression model after scaling regressors and returns an object of class "liu" (by calling liuest function), designed to be used in plotting method, testing of Liu coefficients and for computation of different Liu related statistics. The Liu biasing parameter d can be a scalar or a vector. This new biased estimator was first proposed by Liu (1993) doi:10.1080/03610929308831027.
liu(formula, data, d =1, scaling=c("centered","sc","scaled"),...)liuest(formula, data, d=1, scaling=c("centered","sc","scaled"),...)## Default S3 method:liu(formula, data, d =1, scaling=c("centered","sc","scaled"),...)## S3 method for class 'liu'coef(object,...)## S3 method for class 'liu'print(x, digits = max(5,getOption("digits")-5),...)## S3 method for class 'liu'fitted(object,...)
Arguments
formula: Standard R formula expression, that is, a symbolic representation of the model to be fitted and has form response~predictors. For further details, see formula.
data: An optional data frame containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from which liu or liuest is called.
d: Liu biasing parameter (may be a vector).
scaling: The method to be used to scale the predictors. The scaling option "sc" scales the predictors to correlation form, such that the correlation matrix has unit diagonal elements. "scaled" option standardizes the predictors to have zero mean and unit variance. "centered" option centers the predictors.
object: A liu object, typically generated by a call to liu for fitted.liu, predict.liu, vcov.liu, residuals.liu, infocr.liu, coef.liu, summary.liu and press.liu functions.
x: An object of class liu (for the hatl.liu, lstats.liu, dest.liu, summary.liu, print.liu, print.summary.liu, print.dest, print.lstats, and plot.liu, plot.biasliu and plot.infoliu.
digits: Minimum number of significant digits to be used.
...: Additional arguments to be passed to or from other methods.
Details
liu or liuest function fits in Liu regression after scaling the regressors and centering the response. The liu is default a function that calls liuest for computation of Liu coefficients and returns an object of class "liu" designed to be used in plotting method, testing of Liu coefficients and for computation of different Liu related statistics. If intercept is present in the model, its coefficient is not penalized. However, intercept is estimated from the relation y=y−βX. print.liu tries to be smart about formatting of Liu coefficients.
Returns
liu function returns an object of class "liu" after calling list of named objects from liuest function: - coef: A named vector of fitted coefficients.
call: The matched call.
Inter: Was an intercept included?
scaling: The scaling method used.
mf: Actual data used.
y: The centered response variable.
xs: The scaled matrix of predictors.
xm: The vector of means of the predictors.
terms: The terms object used.
xscale: Square root of sum of squared deviation from mean regarding the scaling option used in liu or liuest function as argument.
lfit: The fitted value of Liu regression for given biasing parameter d.
d: The Liu regression biasing parameter d which can be scalar or a vector.
Note
The function at the current form cannot handle missing values. The user has to take prior action with missing values before using this function.
References
Akdeniz, F. and Kaciranlar, S. (1995). On the Almost Unbiased Generalized Liu Estimators and Unbiased Estimation of the Bias and MSE. Communications in Statistics-Theory and Methods, 24 , 1789--1897. http://doi.org/10.1080/03610929508831585.
Imdad, M. U. (2017). Addressing Linear Regression Models with Correlated Regressors: Some Package Development in R (Doctoral Thesis, Department of Statistics, Bahauddin Zakariya University, Multan, Pakistan).
Imdadullah, M., Aslam, M., and Altaf, S. (2017). liureg: A comprehensive R Package for the Liu Estimation of Linear Regression Model with Collinear Regressors. The R Journal, 9 (2), 232--247.
Liu, K. (1993). A new Class of Biased Estimate in Linear Regression. Journal of Statistical Planning and Inference, 141 , 189--196. http://doi.org/10.1080/03610929308831027.
Author(s)
Muhammad Imdad Ullah, Muhammad Aslam
See Also
Liu model fitting liu, Liu residuals residuals.liu, Liu PRESS press.liu, Testing of Liu Coefficients summary.liu
Examples
data(Hald)mod<-liu(y~., data = as.data.frame(Hald), d = seq(0,0.1,0.01), scaling ="centered")## Scaled Coefficientsmod$coef
## Re-Scaled Coefficientscoef(mod)## Liu fitted valuesfitted(mod)## Liu predited valuespredict(mod)## Liu Residualsresiduals(mod)## Liu traceplot(mod)## Liu Var-Cov matrixvcov(mod)## Liu biasing parameters by researchersdest(mod)## Liu related statisticslstats(mod)## list of objects from liuest functionliuest(y~., data = as.data.frame(Hald), d = seq(0,0.1,0.01), scaling ="centered")