[R] problem with predict()

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Thu Jun 20 23:10:06 CEST 2002


"Czerminski, Ryszard" <ryszard at arqule.com> writes:

> pr <- predict(model, as.data.frame(xr))
> ps <- predict(model, xs)
> 
> cat("length(yr) =", length(yr), "; length(pr) =", length(pr),"\n")
> cat("dim(xr) =", dim(xr), "; dim(xs) =", dim(xs),"\n")
> cat("length(ys) =", length(ys), "; length(ps) =", length(ps), "\n")
> cat("why length(ps) != length(ys) ???\n")
> 
> # my output:
> #
> # length(yr) = 164 ; length(pr) = 164 
> # dim(xr) = 164 118 ; dim(xs) = 35 118 
> # length(ys) = 35 ; length(ps) = 164 
> # why length(ps) != length(ys) ???

Does xs contain a variable called xr?

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list