Displaying 1 result from an estimated 1 matches for "pcrmodel2".
Did you mean:
pcrmodel
2011 Apr 18
2
Predicting with a principal component regression model: "non-conformable arguments" error
...wdata.csv", e.g.,
##################################
trainingdata <- read.csv("mydata_without_train_column.csv", header=TRUE)
trainingdata <- data.frame(trainingdata)
testingdata <- read.csv("newdata.csv", header=TRUE)
testingdata <- data.frame(testingdata)
pcrmodel2 <- pcr(response ~ var1+var2+var3, data = trainingdata)
predict(pcrmodel, type = "response", newdata = testingdata)
##############################
I get the following error:
"Error in newX %*% B : non-conformable arguments"
I don't understand why I get this error only...