I am trying to find the test error for a ridge regression but getting the error
Error in cbind2(1, newx) %% nbeta : not-yet-implemented method for <data.frame> %%
## Using the tuning parameter fit the model to all the training data
ridge_fit_tuning_par = glmnet(X,y, alpha=0, standardize=FALSE, lambda=6.28)
## Compute fitted values for training data:
yhat_test = predict(ridge_fit_tuning_par,test_set)
head(yhat_test)
## Compute test error
test_error = mean((test_set$dis - yhat_test)^2)
test_error
Any ideas what i am doing wrong please?
Many Thank