# NOT RUN {
# require(RXshrink)
data(mpg)
form <- mpg~cylnds+cubins+hpower+weight
MLtest <- MLtrue(form, mpg, go=FALSE) # all other potential arguments "missing"...
MLtest # print current parameter estimates...
cvec <- c(-0.5, 0.15, -0.16, -0.6) # define alternative "true" components...
MLout <- MLtrue(form, mpg, truc = cvec ) # Use "truc" input with default go=TRUE...
str(MLout)
formY <- Yhat~cylnds+cubins+hpower+weight # Formula for true expected Y-outcomes...
lmobj <- lm(formY, MLout$new)
max(abs(lmobj$residuals)) # essentially 0 because linear model is "correct"...
# effobj <- eff.ridge(formY, MLout$new) ...generates "Error" because RSQUARE=1.
# }
Run the code above in your browser using DataLab