[R] Chi-Square Distribution Plots

Petr Pikal petr.pikal at precheza.cz
Mon Sep 30 15:00:00 CEST 2002


Hi

On 30 Sep 2002 at 4:57, Bayesianbay at aol.com wrote:

> Dear list
> 
> I have a vector of values that allegedly have a chi-squared
> distribution. I want to create a plot that shows the values I have
> obtained,  and the chi-squared distribution curve for the specified
> number of degrees of freedom to show what should have been obtained.
> 
> At the moment I am plotting the values I have obtained as a histogram
> and somehow want to put on to this plot the expected frequency curve.
> Is there a way of doing this in R?
after making histogram

something like

lines(density(rchisq(number,deg.f)))

could help, where number is number of generated points and deg.f is selected 
degrees of freedom

> 
> Many thanks in davance
> Laura
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> -.-.-.-.- 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> _._._._._

RegardsPetr Pikal
petr.pikal at precheza.cz
p.pik at volny.cz


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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