I am trying to construct a regression model in R.I am getting an error while predicting the model. I am not sure if the newdata(which is my validation set) should be a data frame?
data<-read.csv("training.csv")
data<- na.omit(data)
model<-lm(Y ~ X1+X2+...+X10, data=data)
newdata<-read.csv("validation.csv")
predict(model,newdata)
I am new to statistic and was trying to perform bartlett test and leneve test to test for constant variance. I am not sure if this is the right way to do it.
bartlett.test(list(X1,X2,X3..X10),data= data)
levene.test(X1,X2..., X10, location="mean")
It would be great if anyone could help.