[R] ks.test help
Uwe Ligges
ligges at statistik.tu-dortmund.de
Thu Feb 14 18:57:28 CET 2008
Brian Flynn wrote:
> I am trying to do a ks.test in R 2.6.2 (running on Mac OS X 10.4.11).
> In the help guides it specifies that the y variable can be a
> character string for the type of distribution I want. I am doing this
> on the residuals of a regression model, but I continue to get an
> error. This is some of the code I have tried:
>
> > ks.test(res,"Norm")
> Error in get(y, mode = "function") :
> variable "Norm" of mode "function" was not found
> > ks.test(res,"norm")
> Error in get(y, mode = "function") :
> variable "norm" of mode "function" was not found
> > ks.test(res,"normal")
> Error in get(y, mode = "function") :
> variable "normal" of mode "function" was not found
You probably want:
ks.test(res, pnorm)
Uwe Ligges
> In this example, res is an object for the residuals of the
> regression. I have seen the following work on another system: ks.test
> (res,"norm"), but for some reason it won't work on mine. Any ideas on
> what I need to fix to get this to work?
>
> Thanks,
>
> Brian Flynn
> cbflynn at auburn.edu
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list