search for: testingdata

Displaying 1 result from an estimated 1 matches for "testingdata".

2011 Apr 18
2
Predicting with a principal component regression model: "non-conformable arguments" error
...a PCR model using the training data #2 and try to predict with the resulting model and the data from "newdata.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: &qu...