Homework 7 DATA 624

In Kuhn and Johnson do problems 6.2 and 6.3. There are only two but they consist of many parts. Please submit a link to your Rpubs and submit the .rmd file as well.

6.2 a)

Developing a model to predict permeability (see Sect.1.4) could save significant resources for a pharmaceutical company, while at the same time more rapidly identifying molecules that have a sufficient permeability to become a drug: (a) Start R and use these commands to load the data:

#install.packages("AppliedPredictiveModeling")
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.4.3
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(AppliedPredictiveModeling)
## Warning: package 'AppliedPredictiveModeling' was built under R version 4.4.3
data(permeability)
glimpse(fingerprints)
##  num [1:165, 1:1107] 0 0 0 0 0 0 0 0 0 0 ...
##  - attr(*, "dimnames")=List of 2
##   ..$ : chr [1:165] "1" "2" "3" "4" ...
##   ..$ : chr [1:1107] "X1" "X2" "X3" "X4" ...

6.2 b)

The fingerprint predictors indicate the presence or absence of substructures of a molecule and are often sparse meaning that relatively few of the molecules contain each substructure. Filter out the predictors that have low frequencies using the nearZeroVar function from the caret package. How many predictors are left for modeling?

#install.packages("dplyr")
library(dplyr)
library(caret)
## Warning: package 'caret' was built under R version 4.4.3
## Loading required package: ggplot2
## Warning: package 'ggplot2' was built under R version 4.4.3
## Loading required package: lattice
## Warning: package 'lattice' was built under R version 4.4.3
# Identify and remove near-zero variance predictors
nzv <- nearZeroVar(fingerprints)
fp2 <- fingerprints[, -nzv]  # Exclude the identified predictors

# Inspect the processed predictors
glimpse(fp2)
##  num [1:165, 1:388] 0 0 0 0 0 0 0 0 0 0 ...
##  - attr(*, "dimnames")=List of 2
##   ..$ : chr [1:165] "1" "2" "3" "4" ...
##   ..$ : chr [1:388] "X1" "X2" "X3" "X4" ...

6.2 c)

Split the data into a training and a test set, pre-process the data, and tune a PLS model. How many latent variables are optimal and what is the corresponding resampled estimate of R2?

perm0 <- cbind(fp2, permeability)

perm <- preProcess(perm0, method = c("BoxCox", "center", "scale", "knnImpute")) %>%
  predict(perm0)

glimpse(perm)
##  num [1:165, 1:389] -0.545 -0.545 -0.545 -0.545 -0.545 ...
##  - attr(*, "dimnames")=List of 2
##   ..$ : chr [1:165] "1" "2" "3" "4" ...
##   ..$ : chr [1:389] "X1" "X2" "X3" "X4" ...
#Data splitting
part <- createDataPartition(perm[,"permeability"], p = 0.75, list = FALSE)

perm_train <- perm[part, ]
perm_test <- perm[-part, ]

glimpse(perm_train)
##  num [1:125, 1:389] -0.545 -0.545 -0.545 -0.545 -0.545 ...
##  - attr(*, "dimnames")=List of 2
##   ..$ : chr [1:125] "1" "2" "4" "7" ...
##   ..$ : chr [1:389] "X1" "X2" "X3" "X4" ...
#Fitting PLS model
set.seed(123)  # Reproducibility
ctrl <- trainControl(method = "LOOCV")

plsMod <- train(
  permeability ~ .,
  data = perm_train,
  method = "pls",
  tuneLength = 20,
  trControl = ctrl
)

# Output the fitted model
print(plsMod)
## Partial Least Squares 
## 
## 125 samples
## 388 predictors
## 
## No pre-processing
## Resampling: Leave-One-Out Cross-Validation 
## Summary of sample sizes: 124, 124, 124, 124, 124, 124, ... 
## Resampling results across tuning parameters:
## 
##   ncomp  RMSE       Rsquared   MAE      
##    1     0.8812716  0.2525593  0.6862655
##    2     0.8142459  0.3616912  0.6145298
##    3     0.7979833  0.3963057  0.5877938
##    4     0.8058493  0.3920893  0.6189943
##    5     0.7765605  0.4443268  0.5971573
##    6     0.7861568  0.4268861  0.5997990
##    7     0.7720060  0.4521974  0.6032828
##    8     0.7653046  0.4632887  0.5937029
##    9     0.7481976  0.4895791  0.5920278
##   10     0.7775312  0.4658593  0.6152112
##   11     0.7718581  0.4783387  0.6110543
##   12     0.7885577  0.4629085  0.6245171
##   13     0.7987837  0.4510991  0.6343129
##   14     0.7950554  0.4607703  0.6345435
##   15     0.8188461  0.4351888  0.6515618
##   16     0.8418999  0.4198980  0.6616757
##   17     0.8662006  0.3990156  0.6824845
##   18     0.8964271  0.3808829  0.7188863
##   19     0.9123648  0.3705201  0.7246136
##   20     0.9338959  0.3549848  0.7351990
## 
## RMSE was used to select the optimal model using the smallest value.
## The final value used for the model was ncomp = 9.

6.2 d)

Predict the response for the test set. What is the test set estimate of R2?

library(yardstick)
## Warning: package 'yardstick' was built under R version 4.4.3
## 
## Attaching package: 'yardstick'
## The following objects are masked from 'package:caret':
## 
##     precision, recall, sensitivity, specificity
predictions <- predict(plsMod, perm_test)
results <- data.frame(pred = predictions, obs = perm_test[,"permeability"])

metrics <- defaultSummary(results)
print(metrics)
##      RMSE  Rsquared       MAE 
## 0.6715091 0.5229450 0.5007096

6.2 e)

Try building other models discussed in this chapter. Do any have better predictive performance?

# Load required libraries
library(caret)
library(elasticnet)
## Loading required package: lars
## Loaded lars 1.3
# Part e: Build alternative models

# Linear Regression (LM)
lmMod <- train(
  permeability ~ .,
  data = perm_train,
  method = "lm",
  trControl = ctrl
)
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
## Warning in predict.lm(modelFit, newdata): prediction from rank-deficient fit;
## attr(*, "non-estim") has doubtful cases
print(lmMod)
## Linear Regression 
## 
## 125 samples
## 388 predictors
## 
## No pre-processing
## Resampling: Leave-One-Out Cross-Validation 
## Summary of sample sizes: 124, 124, 124, 124, 124, 124, ... 
## Resampling results:
## 
##   RMSE      Rsquared   MAE     
##   1.528042  0.1224326  1.014764
## 
## Tuning parameter 'intercept' was held constant at a value of TRUE
# Robust Linear Regression (RLM) with increased iterations
rlmMod <- train(
  permeability ~ .,
  data = perm_train,
  method = "rlm",
  trControl = ctrl,
  preProcess = c("pca"),
  control = list(maxit = 100)  # Increase iterations
)
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## 'rlm' failed to converge in 20 steps
## Warning in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
## some of ... do not match
print(rlmMod)
## Robust Linear Model 
## 
## 125 samples
## 388 predictors
## 
## Pre-processing: principal component signal extraction (388), centered
##  (388), scaled (388) 
## Resampling: Leave-One-Out Cross-Validation 
## Summary of sample sizes: 124, 124, 124, 124, 124, 124, ... 
## Resampling results across tuning parameters:
## 
##   intercept  psi           RMSE       Rsquared   MAE      
##   FALSE      psi.huber     0.7889177  0.4116423  0.5865198
##   FALSE      psi.hampel    0.7868758  0.4118856  0.5881561
##   FALSE      psi.bisquare  0.7970054  0.4088609  0.5941205
##    TRUE      psi.huber     0.7944823  0.4033496  0.5914976
##    TRUE      psi.hampel    0.7927843  0.4033192  0.5926169
##    TRUE      psi.bisquare  0.8033548  0.4001453  0.5994323
## 
## RMSE was used to select the optimal model using the smallest value.
## The final values used for the model were intercept = FALSE and psi = psi.hampel.
# Ridge Regression
ctrl2 <- trainControl(method = "cv", number = 5)  # Use cross-validation
ridgeGrid <- data.frame(.lambda = seq(0.01, 0.1, length = 10))  # Avoid lambda=0
ridgeMod <- train(
  permeability ~ .,
  data = perm_train,
  method = "ridge",
  tuneGrid = ridgeGrid,
  trControl = ctrl2
)
print(ridgeMod)
## Ridge Regression 
## 
## 125 samples
## 388 predictors
## 
## No pre-processing
## Resampling: Cross-Validated (5 fold) 
## Summary of sample sizes: 101, 98, 100, 100, 101 
## Resampling results across tuning parameters:
## 
##   lambda  RMSE        Rsquared   MAE       
##   0.01    78.0434885  0.1850989  44.6392884
##   0.02     4.3992654  0.3087130   2.9337757
##   0.03    33.5727728  0.3458124  23.8466732
##   0.04     0.8986939  0.4300509   0.6938028
##   0.05     0.9090405  0.4351208   0.6910800
##   0.06     4.9479961  0.3385595   3.6422936
##   0.07     0.8766177  0.4512605   0.6798628
##   0.08     0.8708444  0.4568688   0.6758170
##   0.09     0.8673544  0.4588187   0.6738657
##   0.10     0.8638462  0.4591443   0.6717667
## 
## RMSE was used to select the optimal model using the smallest value.
## The final value used for the model was lambda = 0.1.
# Elastic Net
enetGrid <- expand.grid(
  .lambda = seq(0.01, 0.1, length = 10),  # Exclude lambda=0
  .fraction = seq(0.05, 0.95, length = 10)
)
enetMod <- train(
  permeability ~ .,
  data = perm_train,
  method = "enet",
  tuneGrid = enetGrid,
  trControl = ctrl2
)
print(enetMod)
## Elasticnet 
## 
## 125 samples
## 388 predictors
## 
## No pre-processing
## Resampling: Cross-Validated (5 fold) 
## Summary of sample sizes: 101, 99, 101, 99, 100 
## Resampling results across tuning parameters:
## 
##   lambda  fraction  RMSE         Rsquared   MAE        
##   0.01    0.05        7.8529929  0.3149135    6.2822999
##   0.01    0.15       23.0563999  0.2403194   18.4739820
##   0.01    0.25       40.0807460  0.2072511   32.4332984
##   0.01    0.35       50.9037554  0.1874757   40.5108791
##   0.01    0.45       61.9131494  0.1791028   48.6267099
##   0.01    0.55       74.7383227  0.1674962   57.9507226
##   0.01    0.65       88.2576514  0.1583949   67.5592085
##   0.01    0.75      101.6508597  0.1477221   77.4728620
##   0.01    0.85      115.2939725  0.1356078   88.7862309
##   0.01    0.95      129.1543052  0.1206559  100.2692025
##   0.02    0.05        1.7887223  0.3697093    1.2993140
##   0.02    0.15        3.8004337  0.3096503    2.7252582
##   0.02    0.25        5.7171120  0.2803503    4.0734913
##   0.02    0.35        7.6181642  0.2660849    5.4003162
##   0.02    0.45        9.5738808  0.2545563    6.8117564
##   0.02    0.55       11.5619661  0.2460204    8.2539692
##   0.02    0.65       13.5629079  0.2337252    9.7178037
##   0.02    0.75       15.5732832  0.2189910   11.1861090
##   0.02    0.85       17.5733167  0.2050078   12.6321666
##   0.02    0.95       19.5953896  0.1913337   14.0953009
##   0.03    0.05        0.6952549  0.6016173    0.5467029
##   0.03    0.15        0.6874457  0.5636481    0.5268022
##   0.03    0.25        0.7519171  0.5152607    0.5693570
##   0.03    0.35        0.8001044  0.4879892    0.6104575
##   0.03    0.45        0.8325082  0.4676327    0.6393308
##   0.03    0.55        0.8583472  0.4492125    0.6564291
##   0.03    0.65        0.8794816  0.4339965    0.6700800
##   0.03    0.75        0.8983619  0.4184488    0.6837959
##   0.03    0.85        0.9167782  0.4024131    0.6946987
##   0.03    0.95        0.9355432  0.3882487    0.7043694
##   0.04    0.05        0.7085924  0.5902045    0.5573130
##   0.04    0.15        0.6764220  0.5736277    0.5223199
##   0.04    0.25        0.7429463  0.5214806    0.5605265
##   0.04    0.35        0.7886599  0.4966720    0.6027838
##   0.04    0.45        0.8211901  0.4773849    0.6310048
##   0.04    0.55        0.8478545  0.4597209    0.6497501
##   0.04    0.65        0.8693129  0.4435895    0.6638920
##   0.04    0.75        0.8849555  0.4297560    0.6738699
##   0.04    0.85        0.9051640  0.4141757    0.6847274
##   0.04    0.95        0.9239723  0.3999136    0.6943478
##   0.05    0.05        0.7273908  0.5757657    0.5744052
##   0.05    0.15        0.6621334  0.5883312    0.5126470
##   0.05    0.25        0.7279986  0.5332933    0.5477300
##   0.05    0.35        0.7751857  0.5037055    0.5859235
##   0.05    0.45        0.8054962  0.4871006    0.6137534
##   0.05    0.55        0.8289436  0.4726884    0.6352158
##   0.05    0.65        0.8502995  0.4573213    0.6499805
##   0.05    0.75        0.8675547  0.4436030    0.6613875
##   0.05    0.85        0.8840435  0.4301335    0.6709711
##   0.05    0.95        0.8999917  0.4179700    0.6798403
##   0.06    0.05        0.7286791  0.5746949    0.5770065
##   0.06    0.15        0.6613942  0.5910708    0.5113886
##   0.06    0.25        0.7276591  0.5342901    0.5469899
##   0.06    0.35        0.7715639  0.5096984    0.5822908
##   0.06    0.45        0.7985742  0.4948535    0.6098122
##   0.06    0.55        0.8242027  0.4798763    0.6320401
##   0.06    0.65        0.8441698  0.4654408    0.6465157
##   0.06    0.75        0.8591659  0.4531674    0.6548326
##   0.06    0.85        0.8769810  0.4393984    0.6643750
##   0.06    0.95        0.8940232  0.4265515    0.6729199
##   0.07    0.05        0.7461070  0.5660023    0.5938875
##   0.07    0.15        0.6499761  0.6020636    0.5027725
##   0.07    0.25        0.7140591  0.5458763    0.5366581
##   0.07    0.35        0.7641264  0.5128456    0.5761074
##   0.07    0.45        0.7929386  0.4981189    0.6041324
##   0.07    0.55        0.8147595  0.4857783    0.6231430
##   0.07    0.65        0.8341817  0.4744646    0.6391378
##   0.07    0.75        0.8506446  0.4623381    0.6487618
##   0.07    0.85        0.8664220  0.4503523    0.6584507
##   0.07    0.95        0.8809626  0.4394004    0.6663946
##   0.08    0.05        0.7525470  0.5626053    0.6009827
##   0.08    0.15        0.6456714  0.6064583    0.4984201
##   0.08    0.25        0.7104757  0.5491693    0.5337526
##   0.08    0.35        0.7589633  0.5173079    0.5722200
##   0.08    0.45        0.7882147  0.5015666    0.6003864
##   0.08    0.55        0.8088741  0.4905178    0.6183013
##   0.08    0.65        0.8283612  0.4800934    0.6346526
##   0.08    0.75        0.8445171  0.4685427    0.6444711
##   0.08    0.85        0.8599321  0.4570405    0.6536747
##   0.08    0.95        0.8743388  0.4463973    0.6614330
##   0.09    0.05        0.7584233  0.5588863    0.6070373
##   0.09    0.15        0.6419399  0.6112642    0.4954620
##   0.09    0.25        0.7092021  0.5505785    0.5335411
##   0.09    0.35        0.7539666  0.5205911    0.5701829
##   0.09    0.45        0.7849843  0.5040430    0.5982012
##   0.09    0.55        0.8063559  0.4934031    0.6168461
##   0.09    0.65        0.8254631  0.4836602    0.6326692
##   0.09    0.75        0.8407842  0.4732738    0.6416440
##   0.09    0.85        0.8553914  0.4625662    0.6505943
##   0.09    0.95        0.8695896  0.4523664    0.6581032
##   0.10    0.05        0.7645518  0.5552223    0.6133545
##   0.10    0.15        0.6379745  0.6162541    0.4910355
##   0.10    0.25        0.7049784  0.5547401    0.5306310
##   0.10    0.35        0.7530970  0.5240675    0.5682190
##   0.10    0.45        0.7856625  0.5052593    0.5969637
##   0.10    0.55        0.8058650  0.4964030    0.6157743
##   0.10    0.65        0.8235438  0.4872190    0.6311949
##   0.10    0.75        0.8383504  0.4780698    0.6403041
##   0.10    0.85        0.8509645  0.4687834    0.6476231
##   0.10    0.95        0.8649739  0.4584476    0.6549036
## 
## RMSE was used to select the optimal model using the smallest value.
## The final values used for the model were fraction = 0.15 and lambda = 0.1.

6.2f )

Would you recommend any of your models to replace the permeability laboratory experiment?

# Part f: Evaluate models and compare results
# Example: Ridge Regression Test Performance
ridgePred <- predict(ridgeMod, perm_test)
ridgeResults <- data.frame(pred = ridgePred, obs = perm_test[,"permeability"])
ridgeMetrics <- defaultSummary(ridgeResults)
print(ridgeMetrics)
##      RMSE  Rsquared       MAE 
## 0.7559132 0.4668099 0.5816535
# Example: Elastic Net Test Performance
enetPred <- predict(enetMod, perm_test)
enetResults <- data.frame(pred = enetPred, obs = perm_test[,"permeability"])
enetMetrics <- defaultSummary(enetResults)
print(enetMetrics)
##      RMSE  Rsquared       MAE 
## 0.6942129 0.4614141 0.5533280

The analysis suggests that several computational models, specifically PLS, Ridge Regression, and potentially Elastic Net, offer a compelling alternative or supplement to traditional permeability laboratory experiments. These models excel in efficiency, enabling rapid screening of numerous compounds, which translates to significant time and resource savings within the drug development process. Their predictive power is robust, demonstrating a strong ability to capture the intricate relationships between molecular predictors and permeability, as evidenced by high R-squared values and low root mean squared errors. Furthermore, their scalability allows for the handling of complex, high-dimensional datasets, making them particularly well-suited for initial compound screening.

6.3)

. A chemical manufacturing process for a pharmaceutical product was discussed in Sect.1.4. In this problem, the objective is to understand the relationship between biological measurements of the raw materials (predictors),measurements of the manufacturing process (predictors), and the response of product yield. Biological predictors cannot be changed but can be used to assess the quality of the raw material before processing. On the other hand manufacturing process predictors can be changed in the manufacturing process. Improving product yield by 1% will boost revenue by approximately one hundred thousand dollars per batch:

6.3 a)

The matrix processPredictors contains the 57 predictors (12 describing the input biological material and 45 describing the process predictors)for the 176 manufacturing runs. yield contains the percent yield for each run.

# Install necessary packages
#install.packages(c("caret", "dplyr", "ggplot2", "cowplot"))

# Load the libraries
library(caret)      # For pre-processing, training models, etc.
library(dplyr)      # For the pipe operator (%>%)
library(ggplot2)    # For data visualization
library(cowplot)    # For combining multiple ggplot objects
## Warning: package 'cowplot' was built under R version 4.4.3
data(ChemicalManufacturingProcess)
dim(ChemicalManufacturingProcess)
## [1] 176  58

6.3 b)

A small percentage of cells in the predictor set contain missing values. Use an imputation function to fill in these missing values (e.g., see Sect.3.8).

preProcess(ChemicalManufacturingProcess, method = c("knnImpute")) |>
  predict(ChemicalManufacturingProcess) -> cmp0

colSums(is.na(cmp0))
##                  Yield   BiologicalMaterial01   BiologicalMaterial02 
##                      0                      0                      0 
##   BiologicalMaterial03   BiologicalMaterial04   BiologicalMaterial05 
##                      0                      0                      0 
##   BiologicalMaterial06   BiologicalMaterial07   BiologicalMaterial08 
##                      0                      0                      0 
##   BiologicalMaterial09   BiologicalMaterial10   BiologicalMaterial11 
##                      0                      0                      0 
##   BiologicalMaterial12 ManufacturingProcess01 ManufacturingProcess02 
##                      0                      0                      0 
## ManufacturingProcess03 ManufacturingProcess04 ManufacturingProcess05 
##                      0                      0                      0 
## ManufacturingProcess06 ManufacturingProcess07 ManufacturingProcess08 
##                      0                      0                      0 
## ManufacturingProcess09 ManufacturingProcess10 ManufacturingProcess11 
##                      0                      0                      0 
## ManufacturingProcess12 ManufacturingProcess13 ManufacturingProcess14 
##                      0                      0                      0 
## ManufacturingProcess15 ManufacturingProcess16 ManufacturingProcess17 
##                      0                      0                      0 
## ManufacturingProcess18 ManufacturingProcess19 ManufacturingProcess20 
##                      0                      0                      0 
## ManufacturingProcess21 ManufacturingProcess22 ManufacturingProcess23 
##                      0                      0                      0 
## ManufacturingProcess24 ManufacturingProcess25 ManufacturingProcess26 
##                      0                      0                      0 
## ManufacturingProcess27 ManufacturingProcess28 ManufacturingProcess29 
##                      0                      0                      0 
## ManufacturingProcess30 ManufacturingProcess31 ManufacturingProcess32 
##                      0                      0                      0 
## ManufacturingProcess33 ManufacturingProcess34 ManufacturingProcess35 
##                      0                      0                      0 
## ManufacturingProcess36 ManufacturingProcess37 ManufacturingProcess38 
##                      0                      0                      0 
## ManufacturingProcess39 ManufacturingProcess40 ManufacturingProcess41 
##                      0                      0                      0 
## ManufacturingProcess42 ManufacturingProcess43 ManufacturingProcess44 
##                      0                      0                      0 
## ManufacturingProcess45 
##                      0

6.3 c)

Split the data into a training and a test set, pre-process the data, and tune a model of your choice from this chapter. What is the optimal value of the performance metric?

cmp_predictors <- ChemicalManufacturingProcess[, -ncol(ChemicalManufacturingProcess)]  # Exclude Yield
cmp_response <- ChemicalManufacturingProcess$Yield

# Impute missing values
imputationModel <- preProcess(cmp_predictors, method = c("knnImpute"))
cmp0_predictors <- predict(imputationModel, cmp_predictors)
cmp0 <- cbind(cmp0_predictors, Yield = cmp_response)  # Combine predictors and response

head(cmp0)
##        Yield BiologicalMaterial01 BiologicalMaterial02 BiologicalMaterial03
## 1 -1.1792673           -0.2261036           -1.5140979          -2.68303622
## 2  1.2263678            2.2391498            1.3089960          -0.05623504
## 3  1.0042258            2.2391498            1.3089960          -0.05623504
## 4  0.6737219            2.2391498            1.3089960          -0.05623504
## 5  1.2534583            1.4827653            1.8939391           1.13594780
## 6  1.8386128           -0.4081962            0.6620886          -0.59859075
##   BiologicalMaterial04 BiologicalMaterial05 BiologicalMaterial06
## 1            0.2201765            0.4941942           -1.3828880
## 2            1.2964386            0.4128555            1.1290767
## 3            1.2964386            0.4128555            1.1290767
## 4            1.2964386            0.4128555            1.1290767
## 5            0.9414412           -0.3734185            1.5348350
## 6            1.5894524            1.7305423            0.6192092
##   BiologicalMaterial07 BiologicalMaterial08 BiologicalMaterial09
## 1           -0.1313107            -1.233131           -3.3962895
## 2           -0.1313107             2.282619           -0.7227225
## 3           -0.1313107             2.282619           -0.7227225
## 4           -0.1313107             2.282619           -0.7227225
## 5           -0.1313107             1.071310           -0.1205678
## 6           -0.1313107             1.189487           -1.7343424
##   BiologicalMaterial10 BiologicalMaterial11 BiologicalMaterial12
## 1            1.1005296            -1.838655           -1.7709224
## 2            1.1005296             1.393395            1.0989855
## 3            1.1005296             1.393395            1.0989855
## 4            1.1005296             1.393395            1.0989855
## 5            0.4162193             0.136256            1.0989855
## 6            1.6346255             1.022062            0.7240877
##   ManufacturingProcess01 ManufacturingProcess02 ManufacturingProcess03
## 1              0.2154105              0.5662872              0.3765810
## 2             -6.1497028             -1.9692525              0.1979962
## 3             -6.1497028             -1.9692525              0.1087038
## 4             -6.1497028             -1.9692525              0.4658734
## 5             -0.2784345             -1.9692525              0.1087038
## 6              0.4348971             -1.9692525              0.5551658
##   ManufacturingProcess04 ManufacturingProcess05 ManufacturingProcess06
## 1              0.5655598            -0.44593467             -0.5414997
## 2             -2.3669726             0.99933318              0.9625383
## 3             -3.1638563             0.06246417             -0.1117745
## 4             -3.3232331             0.42279841              2.1850322
## 5             -2.2075958             0.84537219             -0.6304083
## 6             -1.2513352             0.49486525              0.5550403
##   ManufacturingProcess07 ManufacturingProcess08 ManufacturingProcess09
## 1             -0.1596700             -0.3095182             -1.7201524
## 2             -0.9580199              0.8941637              0.5883746
## 3              1.0378549              0.8941637             -0.3815947
## 4             -0.9580199             -1.1119728             -0.4785917
## 5              1.0378549              0.8941637             -0.4527258
## 6              1.0378549              0.8941637             -0.2199332
##   ManufacturingProcess10 ManufacturingProcess11 ManufacturingProcess12
## 1            -0.07700901            -0.09157342             -0.4806937
## 2             0.52297397             1.08204765             -0.4806937
## 3             0.31428424             0.55112383             -0.4806937
## 4            -0.02483658             0.80261406             -0.4806937
## 5            -0.39004361             0.10403009             -0.4806937
## 6             0.28819802             1.41736795             -0.4806937
##   ManufacturingProcess13 ManufacturingProcess14 ManufacturingProcess15
## 1             0.97711512              0.8093999              1.1846438
## 2            -0.50030980              0.2775205              0.9617071
## 3             0.28765016              0.4425865              0.8245152
## 4             0.28765016              0.7910592              1.0817499
## 5             0.09066017              2.5334227              3.3282665
## 6            -0.50030980              2.4050380              3.1396277
##   ManufacturingProcess16 ManufacturingProcess17 ManufacturingProcess18
## 1              0.3303945              0.9263296              0.1505348
## 2              0.1455765             -0.2753953              0.1559773
## 3              0.1455765              0.3655246              0.1831898
## 4              0.1967569              0.3655246              0.1695836
## 5              0.4754056             -0.3555103              0.2076811
## 6              0.6261033             -0.7560852              0.1423710
##   ManufacturingProcess19 ManufacturingProcess20 ManufacturingProcess21
## 1              0.4563798              0.3109942              0.2109804
## 2              1.5095063              0.1849230              0.2109804
## 3              1.0926437              0.1849230              0.2109804
## 4              0.9829430              0.1562704              0.2109804
## 5              1.6192070              0.2938027             -0.6884239
## 6              1.9044287              0.3998171             -0.5599376
##   ManufacturingProcess22 ManufacturingProcess23 ManufacturingProcess24
## 1             0.05833309              0.8317688              0.8907291
## 2            -0.72230090             -1.8147683             -1.0060115
## 3            -0.42205706             -1.2132826             -0.8335805
## 4            -0.12181322             -0.6117969             -0.6611496
## 5             0.77891831              0.5911745              1.5804530
## 6             1.07916216             -1.2132826             -1.3508734
##   ManufacturingProcess25 ManufacturingProcess26 ManufacturingProcess27
## 1              0.1200183              0.1256347              0.3460352
## 2              0.1093082              0.1966227              0.1906613
## 3              0.1842786              0.2159831              0.2104362
## 4              0.1708910              0.2052273              0.1906613
## 5              0.2726365              0.2912733              0.3432102
## 6              0.1146633              0.2417969              0.3516852
##   ManufacturingProcess28 ManufacturingProcess29 ManufacturingProcess30
## 1              0.7826636              0.5943242              0.7566948
## 2              0.8779201              0.8347250              0.7566948
## 3              0.8588688              0.7746248              0.2444430
## 4              0.8588688              0.7746248              0.2444430
## 5              0.8969714              0.9549255             -0.1653585
## 6              0.9160227              1.0150257              0.9615956
##   ManufacturingProcess31 ManufacturingProcess32 ManufacturingProcess33
## 1             -0.1952552             -0.4568829              0.9890307
## 2             -0.2672523              1.9517531              0.9890307
## 3             -0.1592567              2.6928719              0.9890307
## 4             -0.1592567              2.3223125              1.7943843
## 5             -0.1412574              2.3223125              2.5997378
## 6             -0.3572486              2.6928719              2.5997378
##   ManufacturingProcess34 ManufacturingProcess35 ManufacturingProcess36
## 1             -1.7202722            -0.88694718             -0.6557774
## 2              1.9568096             1.14638329             -0.6557774
## 3              1.9568096             1.23880740             -1.8000420
## 4              0.1182687             0.03729394             -1.8000420
## 5              0.1182687            -2.55058120             -2.9443066
## 6              0.1182687            -0.51725073             -1.8000420
##   ManufacturingProcess37 ManufacturingProcess38 ManufacturingProcess39
## 1             -1.1540243              0.7174727              0.2317270
## 2              2.2161351             -0.8224687              0.2317270
## 3             -0.7046697             -0.8224687              0.2317270
## 4              0.4187168             -0.8224687              0.2317270
## 5             -1.8280562             -0.8224687              0.2981503
## 6             -1.3787016             -0.8224687              0.2317270
##   ManufacturingProcess40 ManufacturingProcess41 ManufacturingProcess42
## 1             0.05969714            -0.06900773             0.20279570
## 2             2.14909691             2.34626280            -0.05472265
## 3            -0.46265281            -0.44058781             0.40881037
## 4            -0.46265281            -0.44058781            -0.31224099
## 5            -0.46265281            -0.44058781            -0.10622632
## 6            -0.46265281            -0.44058781             0.15129203
##   ManufacturingProcess43 ManufacturingProcess44 Yield
## 1             2.40564734            -0.01588055 38.00
## 2            -0.01374656             0.29467248 42.44
## 3             0.10146268            -0.01588055 42.03
## 4             0.21667191            -0.01588055 41.42
## 5             0.21667191            -0.32643359 42.49
## 6             1.48397347            -0.01588055 43.57
cmp_preprocessed <- preProcess(cmp0_predictors, method = c("BoxCox", "center", "scale")) %>%
  predict(cmp0_predictors)
cmp <- cbind(cmp_preprocessed, Yield = cmp_response)  # Combine processed predictors and response

6.3 d)

Predict the response for the test set. What is the value of the performance metric and how does this compare with the resampled performance metric on the training set?

set.seed(123)  # For reproducibility

# Split the preprocessed data
part <- createDataPartition(cmp$Yield, p = 0.75, list = FALSE)
cmp_train <- cmp[part, ]
cmp_test <- cmp[-part, ]

ctrl <- trainControl(method = "cv", number = 10)  # Use 10-fold cross-validation

plsMod <- train(
  Yield ~ .,
  data = cmp_train,
  method = "pls",
  tuneLength = 20,
  trControl = ctrl
)

print(plsMod)
## Partial Least Squares 
## 
## 132 samples
##  56 predictor
## 
## No pre-processing
## Resampling: Cross-Validated (10 fold) 
## Summary of sample sizes: 118, 118, 119, 119, 120, 118, ... 
## Resampling results across tuning parameters:
## 
##   ncomp  RMSE       Rsquared   MAE      
##    1     0.7496420  0.4507161  0.6077319
##    2     0.6541129  0.5822627  0.5303339
##    3     0.6343909  0.6155513  0.5172640
##    4     0.6325301  0.6230022  0.5182058
##    5     0.6391890  0.6201625  0.5227339
##    6     0.6438033  0.6118681  0.5239960
##    7     0.6336641  0.6183172  0.5164990
##    8     0.6475126  0.6125919  0.5267298
##    9     0.6557464  0.6157413  0.5320176
##   10     0.6748506  0.6012961  0.5482311
##   11     0.7040040  0.5786361  0.5626853
##   12     0.7390387  0.5620774  0.5756156
##   13     0.7688528  0.5521289  0.5880834
##   14     0.7914555  0.5481443  0.5925899
##   15     0.8113567  0.5427046  0.5982320
##   16     0.8256835  0.5422958  0.6016665
##   17     0.8420330  0.5363224  0.6079869
##   18     0.8550410  0.5382051  0.6099619
##   19     0.8661493  0.5353141  0.6148682
##   20     0.8901300  0.5325679  0.6178029
## 
## RMSE was used to select the optimal model using the smallest value.
## The final value used for the model was ncomp = 4.
library(yardstick)

test_results <- predict(plsMod, cmp_test) %>%
  data.frame(pred = ., obs = cmp_test$Yield)

metrics <- defaultSummary(test_results)
print(metrics)
##      RMSE  Rsquared       MAE 
## 0.6856758 0.5086644 0.5741307

6.3 e)

Which predictors are most important in the model you have trained? Do either the biological or process predictors dominate the list?

importance <- varImp(plsMod)
## Warning: package 'pls' was built under R version 4.4.3
## 
## Attaching package: 'pls'
## The following object is masked from 'package:caret':
## 
##     R2
## The following object is masked from 'package:stats':
## 
##     loadings
plot(importance, top = 25)

6.3 f)

Explore the relationships between each of the top predictors and the response. How could this information be helpful in improving yield in future runs of the manufacturing process?

# Check for duplicate column names
duplicated_cols <- duplicated(colnames(cmp))
colnames(cmp)[duplicated_cols]  # Display duplicates
## [1] "Yield"
# Resolve duplicates by renaming columns to ensure uniqueness
colnames(cmp) <- make.names(colnames(cmp), unique = TRUE)

library(ggplot2)

p1 <- ggplot(data = cmp, aes(y = Yield, x = ManufacturingProcess32)) +
  geom_point() +
  geom_smooth(method = "lm") +
  theme_minimal()

p2 <- ggplot(data = cmp, aes(y = Yield, x = ManufacturingProcess09)) +
  geom_point() +
  geom_smooth(method = "lm") +
  theme_minimal()

p3 <- ggplot(data = cmp, aes(y = Yield, x = ManufacturingProcess17)) +
  geom_point() +
  geom_smooth(method = "lm") +
  theme_minimal()

p4 <- ggplot(data = cmp, aes(y = Yield, x = ManufacturingProcess13)) +
  geom_point() +
  geom_smooth(method = "lm") +
  theme_minimal()

library(cowplot)
cowplot::plot_grid(p1, p2, p3, p4)
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.