You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a suggested code or documentation change, improvement to the code, or feature request
The summary method has a hard coded variable name x. This is problematic: x is quite commonly used as the name for a predictor variable when teaching regression. If we have x as a predictor, the summary method incorrectly selects the predictors as the predicted value and vice versa.
Put your code here:
## load package
library("prediction")
## code goes here
set.seed(12345)
N<-200x<- rnorm(N)
y<-x+rnorm(N)
m1<- lm(y~x)
p1<- prediction(m1, at=list(x=-3:3))
summary(p1)
## session info for your system
sessionInfo()
The text was updated successfully, but these errors were encountered:
Please specify whether your issue is about:
The summary method has a hard coded variable name x. This is problematic: x is quite commonly used as the name for a predictor variable when teaching regression. If we have x as a predictor, the summary method incorrectly selects the predictors as the predicted value and vice versa.
Put your code here:
The text was updated successfully, but these errors were encountered: