Guest User

Untitled

a guest
Jul 15th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. library(rms)
  2. exp.var <- names(iris[,c(2:3)])
  3.  
  4. ddist <- datadist(iris); options(datadist="ddist")
  5.  
  6. for (exp in exp.var) {
  7. mod <- ols(formula(paste("Sepal.Length ~ Petal.Width + ", exp, sep="")), data=iris)
  8. #p.mod <- Predict(mod, name=exp)
  9. summary(mod, exp=quantile(iris[,exp], probs=c(0.2, 0.8)))
  10. }
  11.  
  12. Error in summary.rms(mod, exp = quantile(iris[, exp], probs = c(0.2, 0.8))):
  13. factor name(s) not in the design: exp
  14.  
  15. summary(mod, Petal.Length=quantile(iris[,exp], probs=c(0.2, 0.8)))
Add Comment
Please, Sign In to add comment